aboutsummaryrefslogtreecommitdiff
path: root/bleach/tests/test_security.py
diff options
context:
space:
mode:
Diffstat (limited to 'bleach/tests/test_security.py')
-rw-r--r--bleach/tests/test_security.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bleach/tests/test_security.py b/bleach/tests/test_security.py
index 6c2b33f..6adab59 100644
--- a/bleach/tests/test_security.py
+++ b/bleach/tests/test_security.py
@@ -25,10 +25,10 @@ def test_invalid_attr():
clean('<a onclick="evil" href="test">test</a>'))
eq_('<img src="test">',
clean('<img onclick="evil" src="test" />',
- tags=IMG, attributes=IMG_ATTR))
+ tags=IMG, attributes=IMG_ATTR))
eq_('<img src="test">',
clean('<img href="invalid" src="test" />',
- tags=IMG, attributes=IMG_ATTR))
+ tags=IMG, attributes=IMG_ATTR))
def test_unquoted_attr():
@@ -57,7 +57,7 @@ def test_invalid_filter_attr():
eq_('<img src="http://example.com/">',
clean('<img onclick="evil" src="http://example.com/" />',
- tags=IMG, attributes=IMG_ATTR))
+ tags=IMG, attributes=IMG_ATTR))
eq_('<img>', clean('<img onclick="evil" src="http://badhost.com/" />',
tags=IMG, attributes=IMG_ATTR))
@@ -91,9 +91,9 @@ def test_nasty():
"""Nested, broken up, multiple tags, are still foiled!"""
test = ('<scr<script></script>ipt type="text/javascript">alert("foo");</'
'<script></script>script<del></del>>')
- expect = (u'&lt;scr&lt;script&gt;&lt;/script&gt;ipt type="text/javascript"'
- u'&gt;alert("foo");&lt;/script&gt;script&lt;del&gt;&lt;/del&gt;'
- u'&gt;')
+ expect = ('&lt;scr&lt;script&gt;&lt;/script&gt;ipt type="text/javascript"'
+ '&gt;alert("foo");&lt;/script&gt;script&lt;del&gt;&lt;/del&gt;'
+ '&gt;')
eq_(expect, clean(test))