Ticket #9202: field_url_re.diff
File field_url_re.diff, 642 bytes (added by , 16 years ago) |
---|
-
django/forms/fields.py
526 526 return f 527 527 528 528 url_re = re.compile( 529 r'^https?://' # http:// or https:// 530 r'(?:(?:[A-Z0-9-]+\.)+[A-Z]{2,6}|' #domain... 531 r'localhost|' #localhost... 532 r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip 533 r'(?::\d+)?' # optional port 534 r'(?:/?|/\S+)$', re.IGNORECASE) 529 r'^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?', re.IGNORECASE) 535 530 536 531 class URLField(RegexField): 537 532 default_error_messages = {