Skip to content

Commit

Permalink
removing empty paragraphs is not very useful, and can break some (stu…
Browse files Browse the repository at this point in the history
…pid) websites
  • Loading branch information
gfxmonk committed Apr 30, 2010
1 parent 1d862a0 commit 2b6a2d3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions readability/readability.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,6 @@ def sanitize(self, node, candidates):
for elem in self.tags(node, "form", "iframe"):
elem.extract()

# remove empty <p> tags
for elem in node.findAll("p"):
if not (elem.string or elem.contents):
elem.extract()

# Conditionally clean <table>s, <ul>s, and <div>s
for el in self.tags(node, "table", "ul", "div"):
weight = self.class_weight(el)
Expand Down

0 comments on commit 2b6a2d3

Please sign in to comment.