Django

Code

Ticket #7355: html.py.diff

File html.py.diff, 0.8 kB (added by clint, 5 months ago)

The patch for html.py

  • django/utils/html.py

    old new  
    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