]> granicus.if.org Git - python/commitdiff
Oops! Of course, Tim is right -- when the item is not a hex number,
authorGuido van Rossum <guido@python.org>
Mon, 29 Jun 1998 00:42:54 +0000 (00:42 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 29 Jun 1998 00:42:54 +0000 (00:42 +0000)
the '%' should be put back in.

Lib/urllib.py

index ecf505744eae22751f0ea2e88c175a0fa033d044..d294c4ef61b4f77c2899ec59246f58691f1de8f4 100644 (file)
@@ -867,9 +867,9 @@ def unquote(s):
                                myappend(mychr(myatoi(item[:2], 16))
                                         + item[2:])
                        except:
-                               myappend(item)
+                               myappend('%' + item)
                else:
-                       myappend(item)
+                       myappend('%' + item)
        return string.join(res, "")
 
 def unquote_plus(s):