NeNaD
NeNaD

Reputation: 20334

Links inside email are displayed as double plain text

In our web shop we email customers after each purchase. Up until now all emails displayed properly, but now, in some cases all links inside the email is displayed as doubled plain text. This is happening only to some customers, and I can not find anything about that issue and how to solve it.

Correct Display:

enter image description here

Incorrect Display:

enter image description here

NOTE 1:

I created HTML for that email. The link is wrapped with <a> tag, but when we inspect the incorrectly displayed email, the <a> is removed and only the text is present in the DOM.

NOTE 2:

This is only happening to some customers. We checked and they don't have any ad blocked enabled. Also, this is not browser related issue since they also tried to open email on different browsers.

Upvotes: 2

Views: 1890

Answers (2)

Kristen
Kristen

Reputation: 4291

Just in case anyone else winds up here ... we had a similar issue

Our HTML bulk-email (sent programmatically via Exchange) showed formatted correctly in SENT ITEMS, but arrived (when viewed in Outlook) somewhat broken. It was fine if we emailed to e.g. GMail / Hotmail, so probably only a problem with Outlook rendering.

The Outlook presentation was PLAIN TEXT and not Rich / HTML. Noticeable because "View Source" was greyed out. (The content, as sent, definitely had HTML / HEEAD / BODY etc. tags, and it validated OK at W3C - Outlook removed all such HTML tags - seems strange that Outlook decided to display in plain text and then remove all the, correctly coded, HTML tags)

Some, but NOT all, <a href="xxx">yyy</a> tags displayed wrongly - in particular the tag <a href="https://www.example.com/">https://www.example.com/</a> was what we, eventually, found had caused the email to render (in Outlook) as plain text - all HTML tags stripped and some LINKs rendered wrongly. That HTTPS link did render correctly, but others in the same email which were coded as <a href="https://www.link.com/MyPath">www.link.com/MyPath</a> rendered as

www.link.com/MyPath<https://www.link.com/MyPath>

same with mailto: links

Removing the HTTPS:// from within the <a href...>HTTPS://xxx</a> tag fixed the problem - took us a while to find though!

So basically it seems that the HREF property should include https:// and the value within the <a> tag should NOT

Upvotes: 1

Nathan
Nathan

Reputation: 5214

This happens with Outlook.com and Outlook 365 environments. If the link does not have a http:// or https:// (or other) protocol, it will do this.

Therefore, ensure all your links use a protocol, i.e. <a href="https://www.link.com">...</a>, and NOT <a href="www.link.com">...</a>

Upvotes: 2

Related Questions