diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-12-28 16:10:56 +0000 |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-12-28 16:10:56 +0000 |
commit | 6c85838489d4627d0f8292c3a3aead3519d4765c (patch) | |
tree | 02739afa840ab07633c5a102c9ee88cc1acaaba1 /Lib/test/test_htmlparser.py | |
parent | 18f6b1987f0d024445dadbebba9f4395cea622bf (diff) | |
download | cpython-git-6c85838489d4627d0f8292c3a3aead3519d4765c.tar.gz |
Merged revisions 87542 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87542 | senthil.kumaran | 2010-12-28 23:55:16 +0800 (Tue, 28 Dec 2010) | 3 lines
Fix Issue10759 - html.parser.unescape() fails on HTML entities with incorrect syntax
........
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rwxr-xr-x | Lib/test/test_htmlparser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index e982218dba..661d41dce9 100755 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -319,6 +319,10 @@ DOCTYPE html [ self._run_check("<html foo='€&aa&unsupported;'>", [ ("starttag", "html", [("foo", "\u20AC&aa&unsupported;")]) ]) + def test_unescape_function(self): + p = html.parser.HTMLParser() + self.assertEqual(p.unescape('&#bad;'),'&#bad;') + self.assertEqual(p.unescape('&'),'&') def test_main(): |