是否可以禁用 iPhone 的自动超链接?
每当我们收到向我们报告的“网络钓鱼”电子邮件时,我们都会发送通知电子邮件。在这些电子邮件中,我们在原始网络钓鱼电子邮件中包含文本的复制粘贴,作为向我们报告的内容示例。我们的代码通过 PHP 从电子邮件中删除所有超链接,但仍然包含(以纯文本形式)该链接。当用户在其客户端(Thunderbird、Outlook、Horde/IMP 等)中收到此电子邮件时,超链接将被删除。
然而,iPhone 喜欢以纯文本形式获取网址并自动将其转换为超链接。有没有可能通过 HTML 标记或使用 PHP 替换超链接的某些部分来阻止此操作发生?
We send out a notification email whenever we have "phishing" emails reported to us. In these emails, we include a copy-paste of the text inside the original phishing email as a sample of what is reported to us. Our code strips all hyperlinks out of the email via PHP, but still includes (in plain text) the link. When users receive this email in their client (Thunderbird, Outlook, Horde/IMP, etc), the hyperlink is removed.
However, the iPhone likes to take web addresses in plain text and automatically turn them into hyperlinks. Is there any possible way to stop this action from happening via a HTML tag or by using PHP to replace certain parts of the hyperlink?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
似乎没有办法抑制这种行为,那么如何将它们转回链接但没有 href 呢?
http://example.com ->
http://example.com
There doesn't seem to be a way to suppress this behaviour so how about turning them back into links but with no href?
http://example.com ->
<a href="">http://example.com</a>
您可以尝试在 url 的某些部分插入零宽度 unicode 空格。
例如。
u'http://www.\u2060example.com'
(Python 语言 --[抱歉])U+2060 被称为“Word Joiner”。它是一个零宽度、不间断的空白字符。
这不应该是一个有效的 URL,因此希望 iPhone 不会将其转换为链接。
http://en.wikipedia.org/wiki/Space_(punctuation)#Table_of_spaces< /a>
You could try inserting zero-width unicode whitespace at some part of the url.
eg.
u'http://www.\u2060example.com'
(in python --[sorry])U+2060 is called 'Word Joiner'. It's a zero width, non-breaking white space character.
This shouldn't be a valid url, so hopefully the iPhone won't turn it into a link.
http://en.wikipedia.org/wiki/Space_(punctuation)#Table_of_spaces
我必须将包含下划线的电子邮件地址放在引号中以阻止它
被转换为超链接,隐藏下划线。
示例 1:“[电子邮件受保护]”
I had to put my email address that contains an underscore in quotations to stop it from
being turned into a hyperlink which hides the underscore from view.
Example 1: “[email protected]”