8000 Fixed a sanitiser regression from r1248 · html5lib/html5lib-python@ad2869b · GitHub
[go: up one dir, main page]

Skip to content

Commit ad2869b

Browse files
committed
Fixed a sanitiser regression from r1248
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401272
1 parent 09dc1a2 commit ad2869b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html5lib/sanitizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def sanitize_token(self, token):
152152
continue
153153
val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
154154
unescape(attrs[attr])).lower()
155-
if (re.match("^[a-z0-9][-+.a-z0-9]*:",val_unescaped) or
155+
if (re.match("^[a-z0-9][-+.a-z0-9]*:",val_unescaped) and
156156
(val_unescaped.split(':')[0] not in
157157
self.allowed_protocols)):
158158
del attrs[attr]

0 commit comments

Comments
 (0)
0