summaryrefslogtreecommitdiff
path: root/bs4/builder/_lxml.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2016-07-26 22:01:22 -0400
committerLeonard Richardson <leonardr@segfault.org>2016-07-26 22:01:22 -0400
commita15e40b89282ef6924873e41bb08be2eb440880f (patch)
treea12eb070523efae4a59f798ad5ae3866b416bf8f /bs4/builder/_lxml.py
parent3b39288fe9ec805bfe5286214aaf46c1307d2197 (diff)
Fixed a reported (but not duplicated) bug involving processing instructions fed into the lxml HTML parser.
Diffstat (limited to 'bs4/builder/_lxml.py')
-rw-r--r--bs4/builder/_lxml.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bs4/builder/_lxml.py b/bs4/builder/_lxml.py
index 4495bb9..34bb14e 100644
--- a/bs4/builder/_lxml.py
+++ b/bs4/builder/_lxml.py
@@ -107,7 +107,8 @@ class LXMLTreeBuilderForXML(TreeBuilder):
# the document as each one in turn.
is_html = not self.is_xml
if is_html:
- self.processing_instruction_class = ProcessingInstruction
+ pass
+ # self.processing_instruction_class = ProcessingInstruction
else:
self.processing_instruction_class = XMLProcessingInstruction
try_encodings = [user_specified_encoding, document_declared_encoding]
@@ -235,6 +236,7 @@ class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
ALTERNATE_NAMES = ["lxml-html"]
features = ALTERNATE_NAMES + [NAME, HTML, FAST, PERMISSIVE]
+ processing_instruction_class = ProcessingInstruction
is_xml = False
def default_parser(self, encoding):