Fixed #16656 -- Changed the urlize filter to accept more top-level domains.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin 2012-01-08 16:08:43 +00:00
parent 27508918fb
commit 05a3ecbf96
3 changed files with 25 additions and 11 deletions

View file

@ -276,6 +276,12 @@ class DefaultFiltersTests(TestCase):
self.assertEqual(urlize('http://@foo.com'),
u'http://@foo.com')
# Check urlize accepts more TLDs - see #16656
self.assertEqual(urlize('usa.gov'),
u'<a href="http://usa.gov" rel="nofollow">usa.gov</a>')
self.assertEqual(urlize('europa.eu'),
u'<a href="http://europa.eu" rel="nofollow">europa.eu</a>')
def test_wordcount(self):
self.assertEqual(wordcount(''), 0)
self.assertEqual(wordcount(u'oneword'), 1)