Ticket #5657: urlize_ascii_letters.patch
File urlize_ascii_letters.patch, 856 bytes (added by , 17 years ago) |
---|
-
django/utils/html.py
80 80 if match: 81 81 lead, middle, trail = match.groups() 82 82 if middle.startswith('www.') or ('@' not in middle and not middle.startswith('http://') and \ 83 len(middle) > 0 and middle[0] in string. letters + string.digits and \83 len(middle) > 0 and middle[0] in string.ascii_letters + string.digits and \ 84 84 (middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))): 85 85 middle = '<a href="http://%s"%s>%s</a>' % (middle, nofollow_attr, trim_url(middle)) 86 86 if middle.startswith('http://') or middle.startswith('https://'):