From aefa224ccafc202b91775329cbb5f478af9a1288 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Tue, 3 Apr 2012 10:10:13 -0400 Subject: 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] --- bs4/builder/_lxml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bs4/builder/_lxml.py') 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): -- cgit v1.2.3