Sharon Ben Asher
Sharon Ben Asher

Reputation: 14348

force email client to display html address as text and not as link

My web application sends emails to subscribed users. The email is formatted as an html page and contains html addresses specified as plain text (not inside href tag). The intent is for the email client to display the html address as simple text, one that the user can "paint" with the cursor and copy to clipboard

This works just fine in some email clients (for example yahoo). However, other clients (for example, MS outlook and gmail) detect these pieces of text, and display the html address as a link, making it difficult for the user to do the paint-copy-paste described above.

I tried the following:

  1. wrap the text in CDATA block - gmail then disregards the whole block
  2. escape the html address (instead of http://... --> http://...) - makes no difference (still make a link out of text)

any ideas?

Upvotes: 0

Views: 3834

Answers (1)

iPaat
iPaat

Reputation: 840

you could but a double :: to disable the parsing:

http:<span style="display: none;">:</span>//google.com/

This will not show the second : and should avoid the parsing.

EDIT: This will work:

http<span>:</span>//google<span>.</span>com/

Upvotes: 2

Related Questions