Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1b86ccb

Browse files
committed
Remove gratuitious argument in sanitizer
1 parent5c1d8e2 commit1b86ccb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎html5lib/filters/sanitizer.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,15 +765,15 @@ def sanitize_token(self, token):
765765
if ((namespace,name)inself.allowed_elementsor
766766
(namespaceisNoneand
767767
(namespaces["html"],name)inself.allowed_elements)):
768-
returnself.allowed_token(token,token_type)
768+
returnself.allowed_token(token)
769769
else:
770-
returnself.disallowed_token(token,token_type)
770+
returnself.disallowed_token(token)
771771
eliftoken_type=="Comment":
772772
pass
773773
else:
774774
returntoken
775775

776-
defallowed_token(self,token,token_type):
776+
defallowed_token(self,token):
777777
if"data"intoken:
778778
attrs=token["data"]
779779
attr_names=set(attrs.keys())
@@ -823,7 +823,8 @@ def allowed_token(self, token, token_type):
823823
token["data"]=attrs
824824
returntoken
825825

826-
defdisallowed_token(self,token,token_type):
826+
defdisallowed_token(self,token):
827+
token_type=token["type"]
827828
iftoken_type=="EndTag":
828829
token["data"]="</%s>"%token["name"]
829830
eliftoken["data"]:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp