summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-06-29 00:42:54 (GMT)
committerGuido van Rossum <guido@python.org>1998-06-29 00:42:54 (GMT)
commitc94f16f15669faf494a99961334ebbaac88c54d9 (patch)
treea613c4c79f36be64a3b6f802bc73a703fbc17b83 /Lib
parent52e86ad05b3b0471bb56a66c29c6a8c6d864d9a2 (diff)
downloadcpython-c94f16f15669faf494a99961334ebbaac88c54d9.zip
cpython-c94f16f15669faf494a99961334ebbaac88c54d9.tar.gz
cpython-c94f16f15669faf494a99961334ebbaac88c54d9.tar.bz2
Oops! Of course, Tim is right -- when the item is not a hex number,
the '%' should be put back in.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index ecf5057..d294c4e 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -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):