开发者

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()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜