How to unescape a query string
I have a query string as follows:
cmd%5Blogin_user%5D%5Busername%5D=dfdsfdsf&cmd%5Blogin_user%5D%5Bpas开发者_Python百科sword%5D=dsfsdf
How do I unescape it in python?
import urllib
print urllib.unquote("cmd%5Blogin_user%5D%5Busername%5D=dfdsfdsf&cmd%5Blogin_user%5D%5Bpassword%5D=dsfsdf")
Another way is to use the following function: xml.sax.saxutils.unescape()
精彩评论