mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
#20288: fix handling of invalid numeric charrefs in HTMLParser.
This commit is contained in:
parent
a479b7505e
commit
f27b9a741a
3 changed files with 11 additions and 3 deletions
|
@ -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", [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue