From aa4e1522968b19499801fe3d73d6b2f3bf3b3acd Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 8 Jan 2012 09:51:36 +0000 Subject: Fixed #12183 -- Made the urlize filter insert the nofollow attribute properly when an http: URL occurs after a mailto: URL. Thanks eronen for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17356 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/defaultfilters/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/regressiontests') diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py index 515840d87e..2c7cdb17a6 100644 --- a/tests/regressiontests/defaultfilters/tests.py +++ b/tests/regressiontests/defaultfilters/tests.py @@ -253,6 +253,11 @@ class DefaultFiltersTests(TestCase): u'' u'http://en.wikipedia.org/wiki/Café') + # Check urlize adds nofollow properly - see #12183 + self.assertEqual(urlize('foo@bar.com or www.bar.com'), + u'foo@bar.com or ' + u'www.bar.com') + # Check urlize handles IDN correctly - see #13704 self.assertEqual(urlize('http://c✶.ws'), u'http://c✶.ws') -- cgit v1.3