mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #14516 -- Extract methods from removetags and slugify template filters
Patch by @jphalip updated to apply, documentation and release notes added. I've documented strip_tags as well as remove_tags as the difference between the two wouldn't be immediately obvious.
This commit is contained in:
committed by
Andrew Godwin
parent
58683e9c82
commit
212b9826bd
@@ -146,3 +146,12 @@ class TestUtilsHtml(unittest.TestCase):
|
||||
)
|
||||
for value, output in items:
|
||||
self.check_output(f, value, output)
|
||||
|
||||
def test_remove_tags(self):
|
||||
f = html.remove_tags
|
||||
items = (
|
||||
("<b><i>Yes</i></b>", "b i", "Yes"),
|
||||
("<a>x</a> <p><b>y</b></p>", "a b", "x <p>y</p>"),
|
||||
)
|
||||
for value, tags, output in items:
|
||||
self.assertEquals(f(value, tags), output)
|
||||
|
||||
Reference in New Issue
Block a user