Issue #6662: Fix parsing of malformatted charref (&#bad;)

This commit is contained in:
Victor Stinner 2010-05-24 21:33:24 +00:00
parent f0757a2937
commit 554a3b82e4
3 changed files with 12 additions and 0 deletions

View file

@ -313,6 +313,13 @@ DOCTYPE html [
("starttag", "html", [("foo", u"\u20AC&aa&unsupported;")])
])
def test_malformatted_charref(self):
self._run_check("<p>&#bad;</p>", [
("starttag", "p", []),
("data", "&#bad;"),
("endtag", "p"),
])
def test_main():
test_support.run_unittest(HTMLParserTestCase)