Skip to content

Commit 40d23d6

Browse files
committed
Disallow = in unquoted attributes, and allow <. The latter necessitates changing one serializer test (removing the quotes from the expected output).
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401163
1 parent c7e3ffc commit 40d23d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html5lib/serializer/htmlserializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def serialize(self, treewalker, encoding=None):
147147
quote_attr = True
148148
else:
149149
quote_attr = reduce(lambda x,y: x or (y in v),
150-
spaceCharacters + "<>\"'", False)
150+
spaceCharacters + ">\"'=", False)
151151
v = v.replace("&", "&amp;")
152152
if self.escape_lt_in_attrs: v = v.replace("<", "&lt;")
153153
if encoding:

0 commit comments

Comments
 (0)