Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bleach/sanitizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def sanitize_token(self, token):
# characters.
val_unescaped = val_unescaped.replace("\ufffd", "")
if (re.match(r'^[a-z0-9][-+.a-z0-9]*:', val_unescaped)
and (val_unescaped.split(':')[0] not in
self.allowed_protocols)):
and (val_unescaped.split(':')[0] not in
self.allowed_protocols)
and val_unescaped.split(':')[0] != 'data'):
del attrs[attr]
for attr in self.svg_attr_val_allows_ref:
if attr in attrs:
Expand Down