Skip to content

Commit 48fb9e1

Browse files
committed
Passing test for lowercase and failing test for uppercase
1 parent d3de972 commit 48fb9e1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

html5lib/tests/test_sanitizer.py

+12
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,15 @@ def test_sanitizer():
113113
yield (runSanitizerTest, "test_should_allow_uppercase_%s_uris" % protocol,
114114
"<img src=\"%s:%s\">foo</a>" % (protocol, rest_of_uri),
115115
"""<img src="%s:%s">foo</a>""" % (protocol, rest_of_uri))
116+
117+
118+
def test_lowercase_color_codes_in_style():
119+
sanitized = sanitize_html("<p style=\"border: 1px solid #a2a2a2;\"></p>")
120+
expected = '<p style=\"border: 1px solid #a2a2a2;\"></p>'
121+
assert expected == sanitized
122+
123+
124+
def test_uppercase_color_codes_in_style():
125+
sanitized = sanitize_html("<p style=\"border: 1px solid #A2A2A2;\"></p>")
126+
expected = '<p style=\"border: 1px solid #A2A2A2;\"></p>'
127+
assert expected == sanitized

0 commit comments

Comments
 (0)