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

Lines changed: 12 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy