Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Aymeric Augustin authored May 19, 2013

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  tests/defaultfilters/tests.py
6  tests/defaultfilters/tests.py
@@ -306,13 +306,13 @@ def test_urlize(self):
306 306
         self.assertEqual(urlize('(Go to http://www.example.com/foo.)'),
307 307
             '(Go to <a href="http://www.example.com/foo" rel="nofollow">http://www.example.com/foo</a>.)')
308 308
 
309  
-        # Check urlize doesn't crash when square bracket is appended to url (#19070)
  309
+        # Check urlize handles brackets properly (#19070)
310 310
         self.assertEqual(urlize('[see www.example.com]'),
311 311
             '[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]' )
312  
-
313  
-        # Check urlize doesn't crash when square bracket is prepended to url (#19070)
314 312
         self.assertEqual(urlize('see test[at[example.com'),
315 313
             'see <a href="http://test[at[example.com" rel="nofollow">test[at[example.com</a>' )
  314
+        self.assertEqual(urlize('[http://168.192.0.1](http://168.192.0.1)'),
  315
+                         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>')
316 316
 
317 317
         # Check urlize works with IPv4/IPv6 addresses
318 318
         self.assertEqual(urlize('http://192.168.0.15/api/9'),

0 notes on commit d34b1c2

Please sign in to comment.
Something went wrong with that request. Please try again.