hteumeuleu / email-bugs

Email quirks and bugs
535 stars 20 forks source link

T-online.de webmail renders conditional comments #43

Open hteumeuleu opened 6 years ago

hteumeuleu commented 6 years ago

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.

brunorilla commented 5 years ago

Is there any solution for this?

DarkDust commented 5 years ago

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.

M-J-Robbins commented 5 years ago

@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]-->

longtowner commented 5 years ago

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

adrianthomas commented 5 years ago

@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?

longtowner commented 5 years ago

@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.

calebrauxa commented 2 years ago

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

SpecOps12 commented 1 year ago

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

NivenRanchhod commented 1 year ago

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

M-J-Robbins commented 1 year ago

Nice, thanks for sharing @NivenRanchhod this is great news

cygro commented 1 year ago

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