Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to disable email engines from automatically hyperlinking a URL?

One of my clients wants to disable the URL to be shown as a hyperlinked URL, it has to be recognized as plain text, this is what I have tried:

<a href="..." style="text-decoration:none!important">ur<!comments>l</a>

I have also tried to remove the <a></a> tag, as well as remove "http://" of the URL, none of them worked in Outlook. Outlook still recognized it as a hyperlink.

Anybody have any workaround here?

like image 909
user1041029 Avatar asked Dec 06 '11 03:12

user1041029


People also ask

How do I stop email addresses from hyperlinks?

Click AutoCorrect Options, and then click the AutoFormat As You Type tab. Clear the Internet and network paths with hyperlinks check box.


2 Answers

There is a zero-width non-breaking space that I like to use: &#65279;

I place it in strategic places so that the URL does not get recognized as a URL, like so: http&#65279;://www&#65279;domain.&#65279;com.

This strategy has worked for me across platforms and rendering clients. Its advantages are twofold: 1) it prevents the client from auto-rendering text as a link, and 2) unlike other "non-breaking" zero-width space ascii codes (ie &#8302;), it wraps the entire URL if your URL happens to need it (instead of just the parts after the zero-width space).

Try it out.

like image 174
Scott Avatar answered Sep 20 '22 06:09

Scott


Credit belongs to my coworker, actually. Seems to work in all clients that we tested.

www.websitename.<img src="" width="0" height="0">com

An empty image tag with 0 width and 0 height. Insert it between the dot and the following text (in this case "com").

After we tried several things, he somehow suffered from a moment of inspiration/brilliance.

No visible spacing between the characters. Not sure what will happen if you copy/paste the string into a browser directly, though. It served my purpose of not allowing email clients to automatically make it a hyperlink, though.

like image 43
janusoo Avatar answered Sep 21 '22 06:09

janusoo