From f27b9a741ac7771aa1f6c1219d86a61222fdc20a Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 1 Feb 2014 21:21:01 +0200 Subject: #20288: fix handling of invalid numeric charrefs in HTMLParser. --- Lib/test/test_htmlparser.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lib/test/test_htmlparser.py') diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index c977a9dd4d..11d9c9ce8b 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(["
&#bad;
"], [ + ("starttag", "div", []), + ("data", "&#bad;"), + ("endtag", "div"), + ]) def test_unclosed_entityref(self): self._run_check("&entityref foo", [ -- cgit v1.2.1