#6019: URLField does not allow URLs starting with ftp://
--------------------------------------------------+-------------------------
Reporter: Soeren Sonnenburg <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component: Uncategorized
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 1
--------------------------------------------------+-------------------------
basically line 409 in newforms/fields.py is too restrictive
instead of
{{{
url_re = re.compile(
r'^https?://' # http:// or https://
r'(?:(?:[A-Z0-9-]+\.)+[A-Z]{2,6}|' #domain...
r'localhost|' #localhost...
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip
r'(?::\d+)?' # optional port
r'(?:/?|/\S+)$', re.IGNORECASE)
}}}
it should rather be
{{{
url_re = re.compile(
r'^(ftp|https?)://' # http:// or https://
r'(?:(?:[A-Z0-9-]+\.)+[A-Z]{2,6}|' #domain...
r'localhost|' #localhost...
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip
r'(?::\d+)?' # optional port
r'(?:/?|/\S+)$', re.IGNORECASE)
}}}
to allow normal ftp://foo.bar urls - this works with validation too...
--
Ticket URL: <http://code.djangoproject.com/ticket/6019>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---