Permalink
Browse files

removing empty paragraphs is not very useful, and can break some (stu…

…pid) websites
  • Loading branch information...
1 parent 1d862a0 commit 2b6a2d3db4a5d923b964b604c9f41938b0b9e7f6 @timbertson committed Apr 30, 2010
Showing with 0 additions and 5 deletions.
  1. +0 −5 readability/readability.py
@@ -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)

0 comments on commit 2b6a2d3

Please sign in to comment.