开发者

ASCII eqivalent of the symbol ampersand (&) in Obj C

开发者 https://www.devze.com 2023-03-22 11:51 出处:网络
I am sending emails from my iPhone app by calling a web service and in the email body I need to send a URL that contains an ampersand symbol (&). If I use the symbol in my URL the web service does

I am sending emails from my iPhone app by calling a web service and in the email body I need to send a URL that contains an ampersand symbol (&). If I use the symbol in my URL the web service does not send the email, but if I remove that ampersand symbol everything works and the webservice sends the email just fine. So my question is, should I use the ASCII eqiva开发者_如何学Pythonlent of that symbol ? And if so, what is the ASCII eqivalent for '&'? Can any one help me?

This is my URL which has the ampersand symbol

http://xx.xxx.1.xx/xxx/aspxapprvcontrct.aspx?PartyEMail=xx@xxxx.com&devid= 1xx23

Thanks in advance.


You need to escape the whole string (email body) you are sending to your webservice. This question has been asked before on SO, see the link included below. I got it from the link @Caleb included, which in and of itself does not solve your particular problem. I would recommend looking at the second answer posted by @Michael Waterfall.

Objective C HTML escape/unescape

0

精彩评论

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