diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2014-02-01 19:20:22 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2014-02-01 19:20:22 (GMT) |
commit | 5a88853bdc1074e62441c7558502bd989c39f056 (patch) | |
tree | 9139d1488b7e1110573b55c50274a185ba4d6100 /Lib/test/test_htmlparser.py | |
parent | 383952d52c2f904d0fcc2c79cc4957b699482ab8 (diff) | |
download | cpython-5a88853bdc1074e62441c7558502bd989c39f056.zip cpython-5a88853bdc1074e62441c7558502bd989c39f056.tar.gz cpython-5a88853bdc1074e62441c7558502bd989c39f056.tar.bz2 |
#20288: fix handling of invalid numeric charrefs in HTMLParser.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r-- | Lib/test/test_htmlparser.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 6a0e461..cde2bd2 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -394,6 +394,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_unescape_function(self): parser = HTMLParser.HTMLParser() |