Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…pid) websites
  • Loading branch information...
commit 2b6a2d3db4a5d923b964b604c9f41938b0b9e7f6 1 parent 1d862a0
@gfxmonk authored
Showing with 0 additions and 5 deletions.
  1. +0 −5 readability/readability.py
View
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)
Please sign in to comment.
Something went wrong with that request. Please try again.