diff options
Diffstat (limited to 'tests/test_html5lib.py')
-rw-r--r-- | tests/test_html5lib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_html5lib.py b/tests/test_html5lib.py index 3045b02..336f9a5 100644 --- a/tests/test_html5lib.py +++ b/tests/test_html5lib.py @@ -40,6 +40,12 @@ class TestHTML5Builder(TestLXMLBuilder): "<tbody><tr><td>Bar</td></tr></tbody>" "<tfoot><tr><td>Baz</td></tr></tfoot></table>") + def test_literal_in_textarea(self): + markup = '<textarea>Junk like <b> tags and <&<&</textarea>' + soup = self.soup(markup) + self.assertEquals( + soup.textarea.contents, ["Junk like <b> tags and <&<&"]) + def test_collapsed_whitespace(self): """Whitespace is preserved even in tags that don't require it.""" self.assertSoupEquals("<p> </p>") |