Ticket #3421: url_re.patch

File url_re.patch, 552 bytes (added by madssj@…, 17 years ago)

url_re patch

  • django/newforms/fields.py

    diff -ru django_orig/django/newforms/fields.py django_patched/django/newforms/fields.py
    old new  
    340340
    341341url_re = re.compile(
    342342    r'^https?://' # http:// or https://
    343     r'(?:[A-Z0-9-]+\.)+[A-Z]{2,6}' # domain
     343    r'(?:(?:[A-Z0-9-]+\.)+[A-Z]{2,6}|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})' # domain or ip
    344344    r'(?::\d+)?' # optional port
    345345    r'(?:/?|/\S+)$', re.IGNORECASE)
    346346
Back to Top