email-bugs icon indicating copy to clipboard operation
email-bugs copied to clipboard

T-online.de webmail renders conditional comments

Open hteumeuleu opened this issue 6 years ago • 11 comments

The desktop webmail of T-online.de content within HTML conditional comments. So the following example:

<!-- <p>This is an HTML comment.</p> -->
<!--[if mso]>
<p>This is a mso conditional comment.</p>
<![endif]-->
<!--[if foobar]>
<p>This is a foobar conditional comment.</p>
<![endif]-->

…is transformed by T-online.de into the following:

<p>This is a mso conditional comment.</p>
<p>This is a foobar conditional comment.</p>

A screenshot of T-online.de rendering conditional comments

This only affects conditional comments (not regular HTML comments). And this works with any conditional keyword (like foobar in the previous example).

Thanks to @M-J-Robbins for spotting this one yesterday on the #emailgeeks Slack.

hteumeuleu avatar May 30 '18 07:05 hteumeuleu

Is there any solution for this?

brunorilla avatar Dec 10 '18 20:12 brunorilla

There's a workaround we're using in Mail Designer 365: Outlook doesn't understand display:none;¹⁾ but T-Online does. So you can do:

<p>Renders everywhere.</p>
<!--[if mso]>
<p style="display:none;">Renders in Outlook only.</p>
<![endif]-->
  1. AFAIK, Outlook only understands display:none; on TABLE elements.

DarkDust avatar Apr 05 '19 12:04 DarkDust

@DarkDust ah that's clever worth adding to the list here if you can https://howtotarget.email/

Also to target just T-Online you can use <!--[if false]> T-Online <![endif]-->

M-J-Robbins avatar Apr 05 '19 13:04 M-J-Robbins

new Outlook Clients support display: none, that's why we need an additional <!--[if mso]>p.target-class {display: block !important}<![endif]--> to show the content, if it's hidden. t-online keeps the content hidden, because it deletes all the <style> Blocks

longtowner avatar Jul 04 '19 14:07 longtowner

@longtowner

new Outlook Clients support display: none, that's why we need an additional <!--[if mso]>p.target-class {display: block !important}<![endif]--> to show the content, if it's hidden. t-online keeps the content hidden, because it deletes all the <style> Blocks

You mean they support display: none outside of tables? Which clients, the new iOS Outlook?

adrianthomas avatar Jul 04 '19 14:07 adrianthomas

@adrianthomas yes Outlook 365 supports it at least for <center> elements. i tried it today. I had to hide the Text inside a VML Button (https://buttons.cm/) because T-Online shows the Button Text twice.

longtowner avatar Jul 04 '19 15:07 longtowner

Thanks so much for documenting this and making my life easier today.

calebrauxa avatar Jun 07 '22 20:06 calebrauxa

@longtowner You made my day! Works like a charm 🪄

SpecOps12 avatar Nov 28 '22 15:11 SpecOps12

It looks like this issue has been rectified. No mso content is being rendered, as far as I can see 🎉

NivenRanchhod avatar Apr 08 '23 11:04 NivenRanchhod

Nice, thanks for sharing @NivenRanchhod this is great news

M-J-Robbins avatar Apr 19 '23 11:04 M-J-Robbins

Unfortunately, T-Online has released a new preprocessor. The new one removes all comments, including all conditionals as well as all

cygro avatar Jun 21 '23 15:06 cygro