Re: Prevent conditional comments being stripped out in email template?

Anonymous
Not applicable

Prevent conditional comments being stripped out in email template?

I spent two days trying to figure out why parts of an email template I'm developing weren't displaying correctly in Outlook, and I finally discovered that Marketo is stripping out the Microsoft conditional comments (e.g. <!--[if mso]>...<![endif]-->) that target Outlook's rendering limitations. I did some experimeting, and Marketo does not strip them out if they are added to an editable region when editting an email under Marketing Activites. They only seem to be stripped out when they are part of the email template.

Has anyone else run into this issue, and are there any workarounds? I consider this a pretty big limitation in Marketo's email templating system (right up there with the lack of automatic CSS inlining).
Tags (1)
13 REPLIES 13
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

Hi Joe, I have encoutered this when my coding comments popped up in the actual content. I guess they are stripped out to avoid stylesheet hacking. Your styling should work without hacks needed for specific clients. You can use EmailOnAcid or similar programs to see how your emails render in each client/browser/device combination.
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

Subscribing. Have a ticket filed with Support about this.
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

I strongly disagree with Diederik Martens. Hacks are the only reason that email design and development is moving forward at all. If there is no way to correct this, then this is an unacceptable failure on Marketo's part that severely limits the effectiveness of emails.
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

Agreed, Nelson.

FYI - this is the response I received from Support:
This is expected behavior for Marketo email templates. When approving from a template all HTML comments(<!-- -->) are stripped from the HTML during approval. If you have a use case which requires the addition of IE or Outlook conditional statements which are nested in HTML comments, you will need to use the HTML edit functionality from within the editor for individual emails, and not from within the Email template itself.

Frustrating and unfortunate.
- Rachelle
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

I agree with Nelson as well. Mso conditional statements are a very important tool in the email developmemt tool kit. I'm very disappointed that there is no way to tell Marketo not to alter the code.
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

Stephanie, Rachelle, and Nelson – I'm glad I'm not the only one who thinks this a problem!
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

It would be great to do things like background images: http://backgrounds.cm/   or styled buttons: http://buttons.cm/    or hide mobile content in responsive emails in outlook: http://freshinbox.com/blog/bulletproof-solution-to-hiding-mobile-content-when-opened-in-non-mobile-email-clients/ 

It all requires MSO conditional statments. Outlook uses a Word rendering engine... it needs to be individually targeted.

Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

I agree, this is frustrating; not only for Outlook background image fixes, but also just commenting the code overall. We have templates we are creating and using, but sometimes we need to take the HTML of the email into an editor to make one-off changes, and without comments, it's incredibly tedious to find stuff with all the inline markup needed for HTML email.
Anonymous
Not applicable

Re: Prevent conditional comments being stripped out in email template?

This is becoming more and more of an issue with high DPI devices and Outlook.  Many if not all of our emails layouts are being messed up due to image scaling.  Here is a great article btw: https://litmus.com/community/discussions/151-solved-dpi-scaling-in-outlook

Without the Outlook specific code, I can't fix this issue.  By having to manually edit each and every email, it renders templates pointless. This needs to be addressed.