电子邮件包含 = 符号被 gmail/outlook 中的一些字符替换

发布于 2024-10-30 19:17:49 字数 217 浏览 1 评论 0原文

我正在发送 html 格式的自动邮件。我在邮件中提供了一个链接,该链接指向带有 equal(=) 符号的 url。例如:http://mail.com?hello=10_world 该url替换为http://mail.com?hello%10_world,即=符号替换为gmail/outlook中的%符号。

我是不是错过了什么???

I am sending automated mail which is in html format. I am providing a link in the mail which point towards url with equal(=) symbol. for eg: http://mail.com?hello=10_world
this url is replaced with http://mail.com?hello%10_world, that is =symbol is replaced with % symbol in gmail/outlook.

Am i missing some thing???

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嗳卜坏 2024-11-06 19:17:49

由于邮件使用的是quoted-printable,所以代码=10代表字符代码为10的字符,即换行(LF)。当在 URL 中找到换行符时,必须对其进行 URL 编码才能从中建立链接,因此使用序列 %10 对其进行编码。

因此,不是 =% 替换,而是 =10 被解码为 LF 并且然后编码为 %10

要将 = 字符放入带引号的可打印内容中,您需要将其转义为 =3D

The email is using quoted-printable, so the code =10 represents the character with character code 10, i.e. Line Feed (LF). When the line feed character is found in the URL, it has to be URL encoded to make a link out of it, so it's encoded using the sequence %10.

So, it's not the = that is replaced by %, it's the =10 that is decoded as LF and then encoded as %10.

To put a = character in quoted printable you need to escape it as =3D.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文