mirror of
https://github.com/django/django.git
synced 2025-03-11 18:02:35 +00:00
Improved test coverage of urlize.
This commit is contained in:
parent
d12184fedc
commit
c6d1f98d26
@ -305,6 +305,23 @@ class FunctionTests(SimpleTestCase):
|
|||||||
"http://testing.com/example</a>.,:;)"!",
|
"http://testing.com/example</a>.,:;)"!",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_trailing_semicolon(self):
|
||||||
|
self.assertEqual(
|
||||||
|
urlize("http://example.com?x=&", autoescape=False),
|
||||||
|
'<a href="http://example.com?x=" rel="nofollow">'
|
||||||
|
"http://example.com?x=&</a>",
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
urlize("http://example.com?x=&;", autoescape=False),
|
||||||
|
'<a href="http://example.com?x=" rel="nofollow">'
|
||||||
|
"http://example.com?x=&</a>;",
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
urlize("http://example.com?x=&;;", autoescape=False),
|
||||||
|
'<a href="http://example.com?x=" rel="nofollow">'
|
||||||
|
"http://example.com?x=&</a>;;",
|
||||||
|
)
|
||||||
|
|
||||||
def test_brackets(self):
|
def test_brackets(self):
|
||||||
"""
|
"""
|
||||||
#19070 - Check urlize handles brackets properly
|
#19070 - Check urlize handles brackets properly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user