From 4191d5ff45015c6fac1db0bbdd7b3fcaff234424 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 13 Feb 2011 18:04:03 -0500 Subject: Clarified lxml's behavior w/r/t CDATA sections. --- beautifulsoup/builder/lxml_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'beautifulsoup/builder/lxml_builder.py') diff --git a/beautifulsoup/builder/lxml_builder.py b/beautifulsoup/builder/lxml_builder.py index 4e83bba..86ac183 100644 --- a/beautifulsoup/builder/lxml_builder.py +++ b/beautifulsoup/builder/lxml_builder.py @@ -6,8 +6,8 @@ class LXMLTreeBuilder(HTMLTreeBuilder): def __init__(self, parser_class=etree.HTMLParser): # etree.HTMLParser's constructor has an argument strip_cdata, - # but it does nothing. CDATA sections will become text when - # passed through etree.HTMLParser. + # but it does nothing. CDATA sections are always stripped when + # passed through HTMLParser. self.parser = parser_class(target=self) self.soup = None -- cgit v1.2.3 From 09c9ca430e49449cc39cbeb7556230cb62df9b19 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 13 Feb 2011 19:40:29 -0500 Subject: Added tests for namespaced doctypes. --- beautifulsoup/builder/lxml_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'beautifulsoup/builder/lxml_builder.py') diff --git a/beautifulsoup/builder/lxml_builder.py b/beautifulsoup/builder/lxml_builder.py index 86ac183..9ced9f0 100644 --- a/beautifulsoup/builder/lxml_builder.py +++ b/beautifulsoup/builder/lxml_builder.py @@ -32,8 +32,8 @@ class LXMLTreeBuilder(HTMLTreeBuilder): def doctype(self, name, pubid, system): self.soup.endData() - self.soup.handle_data(name) - self.soup.endData(Doctype) + doctype = Doctype.for_name_and_ids(name, pubid, system) + self.soup.object_was_parsed(doctype) def comment(self, content): "Handle comments as Comment objects." -- cgit v1.2.3