removing empty paragraphs is not very useful, and can break some (stupid) websites

pull/1/head
gfxmonk 14 years ago
parent 1d862a00c3
commit 2b6a2d3db4

@ -231,11 +231,6 @@ class Document:
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)

Loading…
Cancel
Save