summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2012-12-04 02:18:10 -0800
committerAndrew Godwin <andrew@aeracode.org>2012-12-04 02:18:10 -0800
commit501c7a221cfd022b6d0021fd9a54005c5ffc7a23 (patch)
tree786d2a9cce6f1af4452b801fc8382e30a67922c2 /tests
parentb64d30405a3d5468dc8c6232747d45bbeee4f7bb (diff)
parent74809fdcc75c400e7d2eac4fa1b0f4113f9f395b (diff)
Merge pull request #573 from tominsam/master
Fixed #19070: urlize template filter raises exception in some cases
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/defaultfilters/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py
index 52268da2ec..8596f8c801 100644
--- a/tests/regressiontests/defaultfilters/tests.py
+++ b/tests/regressiontests/defaultfilters/tests.py
@@ -310,6 +310,10 @@ class DefaultFiltersTests(TestCase):
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>' )
+
def test_wordcount(self):
self.assertEqual(wordcount(''), 0)