Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #5657 -- Use string.ascii_letters instead of ascii.letters in t…

…he 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
  • Loading branch information...
commit bd400a368da2441fe52659ce94e4a095b90aa69d 1 parent c7de28c
Malcolm Tredinnick authored December 03, 2007

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/utils/html.py
2  django/utils/html.py
@@ -100,7 +100,7 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False):
100 100
             if safe_input:
101 101
                 middle = mark_safe(middle)
102 102
             if middle.startswith('www.') or ('@' not in middle and not middle.startswith('http://') and \
103  
-                    len(middle) > 0 and middle[0] in string.letters + string.digits and \
  103
+                    len(middle) > 0 and middle[0] in string.ascii_letters + string.digits and \
104 104
                     (middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))):
105 105
                 middle = '<a href="http://%s"%s>%s</a>' % (
106 106
                         urlquote(middle, safe='/&=:;#?+'),  nofollow_attr,

0 notes on commit bd400a3

Please sign in to comment.
Something went wrong with that request. Please try again.