patch #1462498: handle entityrefs in attribute values.
diff --git a/Lib/test/test_sgmllib.py b/Lib/test/test_sgmllib.py
index bc25bd0..8e8b02f 100644
--- a/Lib/test/test_sgmllib.py
+++ b/Lib/test/test_sgmllib.py
@@ -214,6 +214,20 @@
("starttag", "e", [("a", "rgb(1,2,3)")]),
])
+ def test_attr_values_entities(self):
+ """Substitution of entities and charrefs in attribute values"""
+ # SF bug #1452246
+ self.check_events("""<a b=< c=<> d=<-> e='< '
+ f="&xxx;" g=' !' h='Ǵ' i='x?a=b&c=d;'>""",
+ [("starttag", "a", [("b", "<"),
+ ("c", "<>"),
+ ("d", "<->"),
+ ("e", "< "),
+ ("f", "&xxx;"),
+ ("g", " !"),
+ ("h", "Ǵ"),
+ ("i", "x?a=b&c=d;"), ])])
+
def test_attr_funky_names(self):
self.check_events("""<a a.b='v' c:d=v e-f=v>""", [
("starttag", "a", [("a.b", "v"), ("c:d", "v"), ("e-f", "v")]),