diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -348,6 +348,18 @@ ("starttag", "html", [("foo", u"\u20AC&aa&unsupported;")]) ]) + def test_with_entity_and_non_ascii_in_attribute_value(self): + self._run_check('\xe4 and "', + [('starttag', 'a', [('name', '\xe4 and "')]), + ('data', '\xe4 and '), ('entityref', 'quot'), + ('endtag', 'a')]) + + def test_with_tag_and_non_ascii_in_attribute_value(self): + self._run_check(u'', + [('starttag', 'a', + [('href', '8999.html'), ('title', u'
pa\xeds')])]) + + def test_malformatted_charref(self): self._run_check("

&#bad;

", [ ("starttag", "p", []),