链接在< a href>中无效当内容有.com时,标记 [英] Links does not work in <a href> tag when content has .com inside

查看:99
本文介绍了链接在< a href>中无效当内容有.com时,标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的代码中,我生成了一封html电子邮件的正文。部分内容如下:

 < a href =mylink.pl> SomeName.com< / a> 

在我的邮件客户端或Gmail中收到此电子邮件时,当我点击链接时定向到 SomeName.com 而不是 mylink.pl ,它位于<$ c的href部分$ c>< a> 标签。它看起来这种情况只发生在 .com 域。



任何想法我可以如何处理这个?

解决方案

在电子邮件中使用绝对URI。他们以(通常)> http://

开始

你有一个相对URI,它不在电子邮件中很有意义。您尝试访问浏览器时可能只是点击浏览器的搜索功能。


in my code I generate a body of a html email message. Part of it is following:

<a href="mylink.pl">SomeName.com</a>

When I receive this email in my Mail client or in Gmail and when I click the link I'm directed to the SomeName.com and not to the mylink.pl which is in the href part of the <a> tag. And it looks that this situation occurs only for the .com domains.

Any ideas how I could deal with this?

解决方案

Use absolute URIs in emails. They start with (usually) http://

What you have is a relative URI, which doesn't make much sense in an email. You are probably just hitting your browser's search function when you try to visit it.

这篇关于链接在&lt; a href&gt;中无效当内容有.com时,标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆