Strange urllib.unquote() behavior

Jonas Galvez jonas at codeazur.com.br
Fri Jun 27 00:22:12 CEST 2008


To me, at least.

>>> urllib.unquote("content%28type%3D%2527Car%2527%29")
'content(type=%27Car%27)'
>>> urllib.unquote('content(type=%27Car%27)')
"content(type='Car')"

The quoted string is coming from a URL parameter parsed in a Google App
Engine request handler.

So right now I have to apply unquote() twice in order to get the correct
result.

Any clue much appreciated.

--Jonas Galvez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080626/80c7e156/attachment.html>


More information about the Python-list mailing list