diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-04-16 14:25:18 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-04-16 14:25:18 +0000 |
| commit | 6590061a005b8772baee1a94d7799bcb58d9841d (patch) | |
| tree | f3a151c7ebf4a814aab5f68a0028787a658ce79e /django/forms | |
| parent | 48b459a83e40aa6dae588f114d68f54b95e860de (diff) | |
Fixed #9948 -- Corrected URLField validation to match RFC1035 (URL analog of #9890). Thanks to kratorius for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/fields.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py index ab3fe67aeb..3ff2819571 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -533,7 +533,7 @@ class ImageField(FileField): url_re = re.compile( r'^https?://' # http:// or https:// - r'(?:(?:[A-Z0-9-]+\.)+[A-Z]{2,6}|' #domain... + r'(?:(?:[A-Z0-9]+(?:-*[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 |
