mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #19237 -- Improved strip_tags utility
The previous pattern didn't properly addressed cases where '>' was present inside quoted tag content.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user