summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/defaultfilters/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py
index 2c7cdb17a6..2f3d012346 100644
--- a/tests/regressiontests/defaultfilters/tests.py
+++ b/tests/regressiontests/defaultfilters/tests.py
@@ -268,6 +268,14 @@ class DefaultFiltersTests(TestCase):
self.assertEqual(urlize('info@c✶.org'),
u'<a href="mailto:info@xn--c-lgq.org">info@c✶.org</a>')
+ # Check urlize doesn't highlight malformed URIs - see #16395
+ self.assertEqual(urlize('http:///www.google.com'),
+ u'http:///www.google.com')
+ self.assertEqual(urlize('http://.google.com'),
+ u'http://.google.com')
+ self.assertEqual(urlize('http://@foo.com'),
+ u'http://@foo.com')
+
def test_wordcount(self):
self.assertEqual(wordcount(''), 0)
self.assertEqual(wordcount(u'oneword'), 1)