1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.5.x] Fixed #19237 -- Improved strip_tags utility

The previous pattern didn't properly addressed cases where '>'
was present inside quoted tag content.
Backport of bf1871d87 from master.
This commit is contained in:
Chris Khoo
2012-11-24 12:10:25 +01:00
committed by Claude Paroz
parent a708b8fcbe
commit 9efe1a7210
2 changed files with 5 additions and 1 deletions

View File

@@ -65,6 +65,9 @@ class TestUtilsHtml(unittest.TestCase):
('<f', '<f'),
('</fe', '</fe'),
('<x>b<y>', 'b'),
('a<p onclick="alert(\'<test>\')">b</p>c', 'abc'),
('a<p a >b</p>c', 'abc'),
('d<a:b c:d>e</p>f', 'def'),
)
for value, output in items:
self.check_output(f, value, output)