Reputation: 21
I am sending an autoresponse email which seems to turn a paragraph text into a hyperlink even though I don't want that to happen. This is only happening to Gmail specifically. The text has to have the .co.uk within as thats the name of the company, so can't remove it by law.
I can't use an image replacement for this.
Does anyone know of any suggestions to this?
Upvotes: 2
Views: 13751
Reputation: 1379
Wrapping the @
and .
in <span>
seems to work too:
emailAddress = emailAddress.replace(/@/g, '<span>@</span>').replace(/@/g, '<span>@</span>')
Upvotes: 1
Reputation: 17762
All tricks with replacing dots didn't work for me.
I found another trick - just replace first letter of the domain in uppercalse.
For example, I had a link: fotodruka.lv
which got replaced, but if I enter Fotodruka.lv
it remains as text.
Upvotes: 1
Reputation: 61
Adding ​
is a wise option .
Replace .co.uk in your mail body with .​co.​uk
mailBody.replace(".",".​
");
It worked out for me.
Upvotes: 5
Reputation: 12193
I know Gmail likes to turn addresses and phone numbers into links - not sure why it is doing it to the whole paragraph though... This works to hide the blue hyperlink on phone numbers, so it may work if you wrap your address with this:
<a href="" style="text-decoration:none !important; color:#000001 !important;">somewhere.co.uk</a>
or try a zero width space ​
. Never used it myself, but putting it into the middle of your address may make it unrecognizable (hence unconverted) in Gmail. You could also try breaking the address up with spans.
Upvotes: 0