summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2014-02-01 19:21:01 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2014-02-01 19:21:01 (GMT)
commitf27b9a741ac7771aa1f6c1219d86a61222fdc20a (patch)
tree517d3d39e33b79607e4135bdf1811a2ff908ccd1 /Lib/test
parenta479b7505e88947dd8eff82b6bff604636287893 (diff)
downloadcpython-f27b9a741ac7771aa1f6c1219d86a61222fdc20a.zip
cpython-f27b9a741ac7771aa1f6c1219d86a61222fdc20a.tar.gz
cpython-f27b9a741ac7771aa1f6c1219d86a61222fdc20a.tar.bz2
#20288: fix handling of invalid numeric charrefs in HTMLParser.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_htmlparser.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index c977a9d..11d9c9c 100644
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -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", [