diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-04-07 22:27:44 +0300 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-04-07 22:27:44 +0300 |
commit | 6537be7fb20ca6e2c8617e8369e45c7f484b3724 (patch) | |
tree | 4140ed931562119e2af720c7ded74be811f36ab7 /Lib/test/test_htmlparser.py | |
parent | cece8cfe8a54bb8977ba74599c3861147367a377 (diff) | |
parent | 2e3607c1e758865519b28066b8925f37203e2197 (diff) | |
download | cpython-git-6537be7fb20ca6e2c8617e8369e45c7f484b3724.tar.gz |
#7311: merge with 3.2.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r-- | Lib/test/test_htmlparser.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 5ecd016084..637ab01f12 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -217,6 +217,23 @@ DOCTYPE html [ ("starttag", "a", [("href", "mailto:xyz@example.com")]), ]) + def test_attr_nonascii(self): + # see issue 7311 + self._run_check("<img src=/foo/bar.png alt=\u4e2d\u6587>", [ + ("starttag", "img", [("src", "/foo/bar.png"), + ("alt", "\u4e2d\u6587")]), + ]) + self._run_check("<a title='\u30c6\u30b9\u30c8' " + "href='\u30c6\u30b9\u30c8.html'>", [ + ("starttag", "a", [("title", "\u30c6\u30b9\u30c8"), + ("href", "\u30c6\u30b9\u30c8.html")]), + ]) + self._run_check('<a title="\u30c6\u30b9\u30c8" ' + 'href="\u30c6\u30b9\u30c8.html">', [ + ("starttag", "a", [("title", "\u30c6\u30b9\u30c8"), + ("href", "\u30c6\u30b9\u30c8.html")]), + ]) + def test_attr_entity_replacement(self): self._run_check("""<a b='&><"''>""", [ ("starttag", "a", [("b", "&><\"'")]), |