Oops! Of course, Tim is right -- when the item is not a hex number,

the '%' should be put back in.
This commit is contained in:
Guido van Rossum 1998-06-29 00:42:54 +00:00
parent 52e86ad05b
commit c94f16f156
1 changed files with 2 additions and 2 deletions

View 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):