summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_html.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-03-20 16:50:50 +0100
committerClaude Paroz <claude@2xlibre.net>2014-03-22 11:07:27 +0100
commitd1503afd66ca8f2f8d3819ba8a60727e0ee66cec (patch)
treeeb704add3a7db31d3f0e3e107fe693aef331ee67 /tests/utils_tests/test_html.py
parentc8c2d60614c614174ef30f5bc69601264713a8ef (diff)
[1.6.x] Improved strip_tags and clarified documentation
The fact that strip_tags cannot guarantee to really strip all non-safe HTML content was not clear enough. Also see: https://www.djangoproject.com/weblog/2014/mar/22/strip-tags-advisory/ Backport of 6ca6c36f8 from master.
Diffstat (limited to 'tests/utils_tests/test_html.py')
-rw-r--r--tests/utils_tests/test_html.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py
index ba8f29e3ae..b4e3d28db9 100644
--- a/tests/utils_tests/test_html.py
+++ b/tests/utils_tests/test_html.py
@@ -80,6 +80,8 @@ class TestUtilsHtml(TestCase):
('a<p a >b</p>c', 'abc'),
('d<a:b c:d>e</p>f', 'def'),
('<strong>foo</strong><a href="http://example.com">bar</a>', 'foobar'),
+ ('<sc<!-- -->ript>test<<!-- -->/script>', 'test'),
+ ('<script>alert()</script>&h', 'alert()&h'),
)
for value, output in items:
self.check_output(f, value, output)