diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-12-28 16:05:07 +0000 |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-12-28 16:05:07 +0000 |
commit | 3f60f09eb23be3289ac5cc019391711dcdf800b3 (patch) | |
tree | 25930497b54b42a4c61318d5ede15fded795d149 /Lib/test/test_htmlparser.py | |
parent | 06fdbedf81c49fd9614379ebd68d6388525bf42f (diff) | |
download | cpython-git-3f60f09eb23be3289ac5cc019391711dcdf800b3.tar.gz |
Fix Issue10759 - HTMLParser.unescape() to handle malform charrefs.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r-- | Lib/test/test_htmlparser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index c45cf00ece..717585ca5b 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -320,6 +320,11 @@ DOCTYPE html [ ("endtag", "p"), ]) + def test_unescape_function(self): + parser = HTMLParser.HTMLParser() + self.assertEqual(parser.unescape('&#bad;'),'&#bad;') + self.assertEqual(parser.unescape('&'),'&') + def test_main(): test_support.run_unittest(HTMLParserTestCase) |