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

Commitafa01ff

Browse files
Drew HublCaptainCodeman
Drew Hubl
authored andcommitted
Guarantee we use an allowed protocol
1 parenta265d2d commitafa01ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎html5lib/tests/test_sanitizer.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_sanitizer():
8282
continue
8383
attribute_value='foo'
8484
ifattribute_nameinsanitizer.HTMLSanitizer.attr_val_is_uri:
85-
attribute_value='http://sub.domain.tld/path/object.ext'
85+
attribute_value='%s://sub.domain.tld/path/object.ext'%sanitizer.HTMLSanitizer.allowed_protocols[0]
8686
yield (runSanitizerTest,"test_should_allow_%s_attribute"%attribute_name,
8787
"<p %s=\"%s\">foo &lt;bad&gt;bar&lt;/bad&gt; baz</p>"% (attribute_name,attribute_value),
8888
"<p %s='%s'>foo <bad>bar</bad> baz</p>"% (attribute_name,attribute_value),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp