summaryrefslogtreecommitdiff
path: root/Lib/test/test_htmlparser.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-12-28 16:10:56 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-12-28 16:10:56 +0000
commit6c85838489d4627d0f8292c3a3aead3519d4765c (patch)
tree02739afa840ab07633c5a102c9ee88cc1acaaba1 /Lib/test/test_htmlparser.py
parent18f6b1987f0d024445dadbebba9f4395cea622bf (diff)
downloadcpython-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-xLib/test/test_htmlparser.py4
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='&euro;&amp;&#97;&#x61;&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('&#0038;'),'&')
def test_main():