【发布时间】:2023-03-07 05:26:01
【问题描述】:
我有一个这样的 URL:http://localhost:9001/view/shopindex/display?keyword=test&searchPostcode=Postcode,我使用 HTML mailTo 将它放在新电子邮件的正文中(我知道 mailTo 有更好的选择,但我仅限于此)。实际上我有这个:
<a href="mailto: ?subject=Look at this link&body=http://localhost:9001/view/shopindex/display?keyword=test&searchPostcode=Postcode"></a>
问题是,当我单击并打开新电子邮件时,正文中只得到以下内容:
http://localhost:9001/view/shopindex/display?keyword=test
我认为 mailto 将网页 URL 的查询字符串中的 & 符号标识为 mailto URL 的一部分。有什么办法可以逃脱吗?
谢谢!
Krt_马耳他
【问题讨论】:
标签: java html spring escaping mailto