开发者

Mailto body, special characters?

开发者 https://www.devze.com 2023-01-06 16:55 出处:网络
I\'m trying to have a mailto: body with multiple paragraphs and a URL. I should probably note this is for a mobile web application.

I'm trying to have a mailto: body with multiple paragraphs and a URL. I should probably note this is for a mobile web application.

  1. Is there a reason why I can't use \n (even inside JavaScript strings) for new lines? Instead, I'm using %0D%0A.

  2. I'd like to enclose my URL in <>'s so email clients can properly identify it as a URL, but when I try to do that the entire URL doe开发者_JAVA百科sn't show up at all in the body. Is it being escaped, or something? How do I fix this/use <>'s to wrap it?

Thanks!


have you tryed encoding the values with javascript?

eg

<a href="demo@email.com?subject='+encodeURI('emailSubject')+'&body='+encodeURI('emailBody')+'">
0

精彩评论

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