Ticket #7355: html.py.diff

File html.py.diff, 813 bytes (added by clint, 16 years ago)

The patch for html.py

  • django/utils/html.py

     
    9999            lead, middle, trail = match.groups()
    100100            if safe_input:
    101101                middle = mark_safe(middle)
    102             if middle.startswith('www.') or ('@' not in middle and not middle.startswith('http://') and \
     102            if middle.startswith('www.') or ('@' not in middle and not (middle.startswith('http://') or middle.startswith('https://')) and \
    103103                    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 = 'http://%s' % middle
Back to Top