From b474ffe63a3f99daeef2324a674f7ddfbb653c41 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 1 Apr 2013 15:37:37 +0200 Subject: Fixed #20172 -- Ensured urlize supports IPv4/IPv6 addresses Thanks Marc Aymerich for the report and the initial patch. --- tests/defaultfilters/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/defaultfilters/tests.py b/tests/defaultfilters/tests.py index 8596f8c801..21734faf95 100644 --- a/tests/defaultfilters/tests.py +++ b/tests/defaultfilters/tests.py @@ -314,6 +314,11 @@ class DefaultFiltersTests(TestCase): self.assertEqual(urlize('see test[at[example.com'), 'see test[at[example.com' ) + # Check urlize works with IPv4/IPv6 addresses + self.assertEqual(urlize('http://192.168.0.15/api/9'), + 'http://192.168.0.15/api/9') + self.assertEqual(urlize('http://[2001:db8:cafe::2]/api/9'), + 'http://[2001:db8:cafe::2]/api/9') def test_wordcount(self): self.assertEqual(wordcount(''), 0) -- cgit v1.3