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

Commit6681550

Browse files
committed
added missing parameter for token_type
1 parent496e69f commit6681550

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎html5lib/sanitizer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ def sanitize_token(self, token):
168168
iftoken_typein (tokenTypes["StartTag"],tokenTypes["EndTag"],
169169
tokenTypes["EmptyTag"]):
170170
iftoken["name"]inself.allowed_elements:
171-
returnself.allowed_token(token)
171+
returnself.allowed_token(token,token_type)
172172
else:
173-
returnself.unallowed_token(token)
173+
returnself.unallowed_token(token,token_type)
174174
eliftoken_type==tokenTypes["Comment"]:
175175
pass
176176
else:
177177
returntoken
178178

179-
defallowed_token(self,token):
179+
defallowed_token(self,token,token_type):
180180
if"data"intoken:
181181
attrs=dict([(name,val)forname,valin
182182
token["data"][::-1]
@@ -206,7 +206,7 @@ def allowed_token(self, token):
206206
token["data"]= [[name,val]forname,valinlist(attrs.items())]
207207
returntoken
208208

209-
defunallowed_token(self,token):
209+
defunallowed_token(self,token,token_type):
210210
iftoken_type==tokenTypes["EndTag"]:
211211
token["data"]="</%s>"%token["name"]
212212
eliftoken["data"]:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp