Ticket #9202: field_url_re.diff

File field_url_re.diff, 642 bytes (added by niccl, 16 years ago)
  • django/forms/fields.py

     
    526526        return f
    527527
    528528url_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)
    535530
    536531class URLField(RegexField):
    537532    default_error_messages = {
Back to Top