#20288: fix handling of invalid numeric charrefs in HTMLParser.

This commit is contained in:
Ezio Melotti 2014-02-01 21:21:01 +02:00
parent a479b7505e
commit f27b9a741a
3 changed files with 11 additions and 3 deletions

View file

@ -151,6 +151,12 @@ text
("data", "&#bad;"),
("endtag", "p"),
])
# add the [] as a workaround to avoid buffering (see #20288)
self._run_check(["<div>&#bad;</div>"], [
("starttag", "div", []),
("data", "&#bad;"),
("endtag", "div"),
])
def test_unclosed_entityref(self):
self._run_check("&entityref foo", [