Skip to content

Commit a970689

Browse files
data- attributes
1 parent 8bf6e22 commit a970689

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

html5lib/sanitizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def allowed_token(self, token, token_type):
181181
if "data" in token:
182182
attrs = dict([(name, val) for name, val in
183183
token["data"][::-1]
184-
if name in self.allowed_attributes])
184+
if name in self.allowed_attributes or name.startswith('data-')])
185185
for attr in self.attr_val_is_uri:
186186
if attr not in attrs:
187187
continue

0 commit comments

Comments
 (0)