Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.6.x] Removed a strip_tags test for older Python versions

Django's custom HTMLParser for older Python versions cannot
parse convoluted syntax.
  • Loading branch information...
commit f05f5c231a916082b5fa2e0980fbf7abeb390032 1 parent 5f7b3e5
@claudep claudep authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/utils_tests/
4 tests/utils_tests/
@@ -63,6 +63,7 @@ def test_linebreaks(self):
self.check_output(f, value, output)
def test_strip_tags(self):
+ from django.utils.html_parser import use_workaround
f = html.strip_tags
items = (
('<p>See: &#39;&eacute; is an apostrophe followed by e acute</p>',
@@ -80,9 +81,10 @@ def test_strip_tags(self):
('a<p a >b</p>c', 'abc'),
('d<a:b c:d>e</p>f', 'def'),
('<strong>foo</strong><a href="">bar</a>', 'foobar'),
- ('<sc<!-- -->ript>test<<!-- -->/script>', 'test'),
('<script>alert()</script>&h', 'alert()&h'),
+ if not use_workaround:
+ items += (('<sc<!-- -->ript>test<<!-- -->/script>', 'test'),)
for value, output in items:
self.check_output(f, value, output)

0 comments on commit f05f5c2

Please sign in to comment.
Something went wrong with that request. Please try again.