diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-04-03 10:10:13 -0400 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-04-03 10:10:13 -0400 |
commit | aefa224ccafc202b91775329cbb5f478af9a1288 (patch) | |
tree | 20e6861ed80649fef712568b057c6ce34e64f42f /bs4/builder/_lxml.py | |
parent | 6a02ce5d6ae8286736d74ce0b616810fa234cbc2 (diff) |
Got rid of the 4.0.2 workaround for HTML documents--it was unnecessary and the workaround was triggering a (possibly different, but related) bug in lxml. [bug=972466]
Diffstat (limited to 'bs4/builder/_lxml.py')
-rw-r--r-- | bs4/builder/_lxml.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bs4/builder/_lxml.py b/bs4/builder/_lxml.py index 5c7b058..6491322 100644 --- a/bs4/builder/_lxml.py +++ b/bs4/builder/_lxml.py @@ -80,7 +80,8 @@ class LXMLTreeBuilderForXML(TreeBuilder): while data != '': # Now call feed() on the rest of the data, chunk by chunk. data = markup.read(self.CHUNK_SIZE) - self.parser.feed(data) + if data != '': + self.parser.feed(data) self.parser.close() def close(self): |