summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorErik Romijn <eromijn@solidlinks.nl>2013-05-19 13:39:21 +0200
committerErik Romijn <eromijn@solidlinks.nl>2013-05-19 13:39:21 +0200
commit1927bf7c91761040a7e46197fc2d19b66f2ae332 (patch)
tree122f807d5407775999916d0f87d372179c0a756d /tests
parent3d5a546254b357ad27d5465700945e2bc472c3bc (diff)
Fix #19070 -- Additional test for urlize and brackets
Diffstat (limited to 'tests')
-rw-r--r--tests/defaultfilters/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/defaultfilters/tests.py b/tests/defaultfilters/tests.py
index be16719c8e..f885f4fa73 100644
--- a/tests/defaultfilters/tests.py
+++ b/tests/defaultfilters/tests.py
@@ -306,13 +306,13 @@ class DefaultFiltersTests(TestCase):
self.assertEqual(urlize('(Go to http://www.example.com/foo.)'),
'(Go to <a href="http://www.example.com/foo" rel="nofollow">http://www.example.com/foo</a>.)')
- # Check urlize doesn't crash when square bracket is appended to url (#19070)
+ # Check urlize handles brackets properly (#19070)
self.assertEqual(urlize('[see www.example.com]'),
'[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]' )
-
- # Check urlize doesn't crash when square bracket is prepended to url (#19070)
self.assertEqual(urlize('see test[at[example.com'),
'see <a href="http://test[at[example.com" rel="nofollow">test[at[example.com</a>' )
+ self.assertEqual(urlize('[http://168.192.0.1](http://168.192.0.1)'),
+ u'[<a href="http://168.192.0.1](http://168.192.0.1)" rel="nofollow">http://168.192.0.1](http://168.192.0.1)</a>')
# Check urlize works with IPv4/IPv6 addresses
self.assertEqual(urlize('http://192.168.0.15/api/9'),