diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-24 21:33:24 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-24 21:33:24 +0000 |
commit | 554a3b82e40573846f893ffdfff230e1d908af57 (patch) | |
tree | 8ab602c52463479d9d7c7263d25ea77f62f4e4c2 /Lib/test/test_htmlparser.py | |
parent | f0757a2937b4b341d828f68c1a857658fac01649 (diff) | |
download | cpython-git-554a3b82e40573846f893ffdfff230e1d908af57.tar.gz |
Issue #6662: Fix parsing of malformatted charref (&#bad;)
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r-- | Lib/test/test_htmlparser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 810af6c8cb..c45cf00ece 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -313,6 +313,13 @@ DOCTYPE html [ ("starttag", "html", [("foo", u"\u20AC&aa&unsupported;")]) ]) + def test_malformatted_charref(self): + self._run_check("<p>&#bad;</p>", [ + ("starttag", "p", []), + ("data", "&#bad;"), + ("endtag", "p"), + ]) + def test_main(): test_support.run_unittest(HTMLParserTestCase) |