We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent5c1d8e2 commit1b86ccbCopy full SHA for 1b86ccb
html5lib/filters/sanitizer.py
@@ -765,15 +765,15 @@ def sanitize_token(self, token):
765
if ((namespace,name)inself.allowed_elementsor
766
(namespaceisNoneand
767
(namespaces["html"],name)inself.allowed_elements)):
768
-returnself.allowed_token(token,token_type)
+returnself.allowed_token(token)
769
else:
770
-returnself.disallowed_token(token,token_type)
+returnself.disallowed_token(token)
771
eliftoken_type=="Comment":
772
pass
773
774
returntoken
775
776
-defallowed_token(self,token,token_type):
+defallowed_token(self,token):
777
if"data"intoken:
778
attrs=token["data"]
779
attr_names=set(attrs.keys())
@@ -823,7 +823,8 @@ def allowed_token(self, token, token_type):
823
token["data"]=attrs
824
825
826
-defdisallowed_token(self,token,token_type):
+defdisallowed_token(self,token):
827
+token_type=token["type"]
828
iftoken_type=="EndTag":
829
token["data"]="</%s>"%token["name"]
830
eliftoken["data"]: