summaryrefslogtreecommitdiff
path: root/tests/test_lxml.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-13 10:37:24 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-13 10:37:24 -0500
commit84d7f8dd319039d385b9afe1da751006be2c9859 (patch)
treeb265fc282c99140d1371962b2339bc32cde1beff /tests/test_lxml.py
parentd89c8878ea86a2575c87e9fad8081cfcd81e0bcd (diff)
Figured out the deal with CDATA sections in lxml and html5lib, and added comments and tests.
Diffstat (limited to 'tests/test_lxml.py')
-rw-r--r--tests/test_lxml.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_lxml.py b/tests/test_lxml.py
index 9a65f6a..207d141 100644
--- a/tests/test_lxml.py
+++ b/tests/test_lxml.py
@@ -273,3 +273,7 @@ class TestLXMLBuilderInvalidMarkup(SoupTest):
markup = "<p>one<!DOCTYPE foobar>two</p>"
self.assertSoupEquals(markup)
+ def test_cdata_where_it_doesnt_belong(self):
+ #CDATA sections are ignored.
+ markup = "<div><![CDATA[foo]]>"
+ self.assertSoupEquals(markup, "<div></div>")