summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2012-10-31 11:01:39 +0000
committerAndrew Godwin <andrew@aeracode.org>2012-10-31 11:01:39 +0000
commitf1be2c7a81b6364e353b351919eca588d288d4a4 (patch)
tree25cee0aa34280d4f78199d18087d1b1b64c7a89a /tests
parent0dcaddb57143048c4647047ccbb5574d2ea713a5 (diff)
Fixed #19070 -- urlize filter no longer raises exceptions on 2.7
Thanks to claudep for the patch.
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/defaultfilters/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py
index d00203e304..52268da2ec 100644
--- a/tests/regressiontests/defaultfilters/tests.py
+++ b/tests/regressiontests/defaultfilters/tests.py
@@ -304,7 +304,12 @@ class DefaultFiltersTests(TestCase):
# Check urlize trims trailing period when followed by parenthesis - see #18644
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>.)')
+ '(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)
+ self.assertEqual(urlize('[see www.example.com]'),
+ '[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]' )
+
def test_wordcount(self):
self.assertEqual(wordcount(''), 0)