Django

Code

Changeset 6856

Show
Ignore:
Timestamp:
12/02/07 18:41:42 (9 months ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/utils/html.py

    r6683 r6856  
    101101                middle = mark_safe(middle) 
    102102            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 \ 
    104104                    (middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))): 
    105105                middle = '<a href="http://%s"%s>%s</a>' % (