From 6a53c8a2dd3b818ed4426c6de05a58ba1e1cdd0d Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 10 Nov 2006 03:39:00 +0000 Subject: [PATCH] Fixed #2997 -- Fixed URLField validation in django.newforms. Thanks, jkocherhans git-svn-id: http://code.djangoproject.com/svn/django/trunk@4061 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/newforms/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/newforms/fields.py b/django/newforms/fields.py index 54089cb3c3..b9e2ed35c7 100644 --- a/django/newforms/fields.py +++ b/django/newforms/fields.py @@ -215,7 +215,7 @@ class URLField(RegexField): "User-Agent": self.user_agent, } try: - req = urllib2.Request(field_data, None, headers) + req = urllib2.Request(value, None, headers) u = urllib2.urlopen(req) except ValueError: raise ValidationError(u'Enter a valid URL.')