Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1161 from erikr/urlize-additional-test

Fixed #19070 -- Additional test for urlize and brackets
  • Loading branch information...
commit d34b1c29e294b19e51a47918125314a1540c01d4 2 parents f746718 + 1927bf7
@aaugustin aaugustin authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/defaultfilters/tests.py
View
6 tests/defaultfilters/tests.py
@@ -306,13 +306,13 @@ def test_urlize(self):
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'),
Please sign in to comment.
Something went wrong with that request. Please try again.