From f224b8536ce266538bcfa492ec8d2b3b41fceae5 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 26 Feb 2012 09:22:42 -0500 Subject: Fixed DOCTYPE handling. --- bs4/testing.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bs4/testing.py') diff --git a/bs4/testing.py b/bs4/testing.py index 13a7b5a..49644c3 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -79,6 +79,13 @@ class HTMLTreeBuilderSmokeTest(object): self.assertDoctypeHandled( 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"') + def test_public_doctype_with_url(self): + doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"' + self.assertDoctypeHandled(doctype) + + def test_system_doctype(self): + self.assertDoctypeHandled('foo SYSTEM "http://www.example.com/"') + def test_namespaced_system_doctype(self): # We can handle a namespaced doctype with a system ID. self.assertDoctypeHandled('xsl:stylesheet SYSTEM "htmlent.dtd"') -- cgit v1.2.3