diff options
author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-03 00:41:42 +0000 |
---|---|---|
committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-03 00:41:42 +0000 |
commit | bd400a368da2441fe52659ce94e4a095b90aa69d (patch) | |
tree | 69ee97c761915e09864565dacdbb7e13c3883c0e | |
parent | c7de28c64c837752d8c69995b3609061e7a7732d (diff) | |
download | django-bd400a368da2441fe52659ce94e4a095b90aa69d.tar.gz |
Fixed #5657 -- Use string.ascii_letters instead of ascii.letters in the urlize
filter to ensure consistent (and correct) results no matter what the server's
locale setting might be. Thanks, Andrew Stoneman.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r-- | django/utils/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index cb786db1e4..34bbf7357f 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -100,7 +100,7 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False): if safe_input: middle = mark_safe(middle) if middle.startswith('www.') or ('@' not in middle and not middle.startswith('http://') and \ - len(middle) > 0 and middle[0] in string.letters + string.digits and \ + len(middle) > 0 and middle[0] in string.ascii_letters + string.digits and \ (middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))): middle = '<a href="http://%s"%s>%s</a>' % ( urlquote(middle, safe='/&=:;#?+'), nofollow_attr, |