Skip to content

Commit 39d65b5

Browse files
author
Drew Hubl
committed
Guarantee we use an allowed protocol
1 parent 3b84dd5 commit 39d65b5

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
if attribute_name in sanitizer.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)