开发者

email address in the url

I am passing the email address as part of the url,

for ex. http://example.com/hello/user@hotmail.com

but, when being passed to the application controller it is changed to " user%40hotmail.com ".

I can't seem to understand this special character escaping; confusion. please help me explain the problem here, and also what can I开发者_StackOverflow do to fix it.

I am using python's "webapp" web application framework.


It's being URL encoded.

You'll need to decode it.


@ turns into %40 because of percent encoding commonly known as url encoding.

Without knowing exactly how the code is being used, it would be worth while to look at urllib utility functions for decoding. Here is one for example,

  • unquote:

Replace %xx escapes by their single-character equivalent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜