Allow "@" in unquoted attribute values.
Added test that checks for characters allowed in the query part of URLs.
Backport candidate.
diff --git a/Lib/test/test_sgmllib.py b/Lib/test/test_sgmllib.py
index 6f4454f..6a77e07 100644
--- a/Lib/test/test_sgmllib.py
+++ b/Lib/test/test_sgmllib.py
@@ -200,6 +200,15 @@
self.check_events("""<a b='' c="">""", [
("starttag", "a", [("b", ""), ("c", "")]),
])
+ # URL construction stuff from RFC 1808:
+ safe = "$-_.+"
+ extra = "!*'(),"
+ reserved = ";/?:@&="
+ url = "http://example.com:8080/path/to/file?%s%s%s" % (
+ safe, extra, reserved)
+ self.check_events("""<e a=%s>""" % url, [
+ ("starttag", "e", [("a", url)]),
+ ])
# Regression test for SF patch #669683.
self.check_events("<e a=rgb(1,2,3)>", [
("starttag", "e", [("a", "rgb(1,2,3)")]),