电子邮件包含 = 符号被 gmail/outlook 中的一些字符替换
我正在发送 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
由于邮件使用的是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 asLF
and then encoded as%10
.To put a
=
character in quoted printable you need to escape it as=3D
.