We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b242d88 commit dc7a9d3Copy full SHA for dc7a9d3
src/html5lib/sanitizer.py
@@ -152,6 +152,8 @@ def sanitize_token(self, token):
152
continue
153
val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
154
unescape(attrs[attr])).lower()
155
+ #remove replacement characters from unescaped characters
156
+ val_unescaped = val_unescaped.replace(u"\ufffd", "")
157
if (re.match("^[a-z0-9][-+.a-z0-9]*:",val_unescaped) and
158
(val_unescaped.split(':')[0] not in
159
self.allowed_protocols)):
0 commit comments