diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-01-08 09:51:36 +0000 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-01-08 09:51:36 +0000 |
| commit | aa4e1522968b19499801fe3d73d6b2f3bf3b3acd (patch) | |
| tree | 519098cb67f2cc84fb6169d837b6682e8f215d1b /tests | |
| parent | d101ed2cb8d5a25e0120764fe5ed86c101a2113a (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/defaultfilters/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
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'<a href="http://en.wikipedia.org/wiki/Caf%C3%A9" rel="nofollow">' u'http://en.wikipedia.org/wiki/Café</a>') + # Check urlize adds nofollow properly - see #12183 + self.assertEqual(urlize('foo@bar.com or www.bar.com'), + u'<a href="mailto:foo@bar.com">foo@bar.com</a> or ' + u'<a href="http://www.bar.com" rel="nofollow">www.bar.com</a>') + # Check urlize handles IDN correctly - see #13704 self.assertEqual(urlize('http://c✶.ws'), u'<a href="http://xn--c-lgq.ws" rel="nofollow">http://c✶.ws</a>') |
