diff --git a/html5lib/filters/sanitizer.py b/html5lib/filters/sanitizer.py index e852f53b..ce67b7de 100644 --- a/html5lib/filters/sanitizer.py +++ b/html5lib/filters/sanitizer.py @@ -825,7 +825,7 @@ def allowed_token(self, token): if uri and uri.scheme: if uri.scheme not in self.allowed_protocols: del attrs[attr] - if uri.scheme == 'data': + elif uri.scheme == 'data': m = data_content_type.match(uri.path) if not m: del attrs[attr]