diff options
author | Brian Quinlan <brian@sweetapp.com> | 2011-04-08 08:30:41 +1000 |
---|---|---|
committer | Brian Quinlan <brian@sweetapp.com> | 2011-04-08 08:30:41 +1000 |
commit | d08b330a1538132737d9de646a53dd9dae581d57 (patch) | |
tree | 5cc75a8b44d3a742d75e7872631c3b9e7df211bf /Lib/test/test_htmlparser.py | |
parent | f007876bd64def2829a242e0cf5adfd3ef25c4be (diff) | |
parent | b1eb6602703d040b91e444a8764ea1ba8af69a21 (diff) | |
download | cpython-git-d08b330a1538132737d9de646a53dd9dae581d57.tar.gz |
Merge to tip.
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", "&><\"'")]), |