Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #16812 -- Percent-encode URLs in verify_exists, to fix test fai…

…lures on Python 2.5 and 2.6.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 568681c6da0638851b2e752167d9587f63c56193 1 parent e5090a3
@carljm carljm authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  django/core/validators.py
View
3  django/core/validators.py
@@ -1,5 +1,6 @@
import platform
import re
+import urllib
import urllib2
import urlparse
@@ -92,6 +93,8 @@ def __call__(self, value):
"User-Agent": self.user_agent,
}
url = url.encode('utf-8')
+ # Quote characters from the unreserved set, refs #16812
+ url = urllib.quote(url, "!*'();:@&=+$,/?#[]")
broken_error = ValidationError(
_(u'This URL appears to be a broken link.'), code='invalid_link')
try:
Please sign in to comment.
Something went wrong with that request. Please try again.