by @mwielgoszewski
authorKenneth Reitz <me@kennethreitz.com>
Tue, 29 May 2012 23:54:40 +0000 (19:54 -0400)
committerKenneth Reitz <me@kennethreitz.com>
Tue, 29 May 2012 23:54:40 +0000 (19:54 -0400)
requests/utils.py

index 1fe853a0cd0d12033191d58ba1ab479fe9f91a82..8c445e7b23f1f6d0a89d97e91d732fbe9ecc2db6 100644 (file)
@@ -414,7 +414,7 @@ def unquote_unreserved(uri):
         parts = uri.split('%')
         for i in range(1, len(parts)):
             h = parts[i][0:2]
-            if len(h) == 2:
+            if len(h) == 2 and h.isalnum():
                 c = chr(int(h, 16))
                 if c in UNRESERVED_SET:
                     parts[i] = c + parts[i][2:]