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

Anonymous
Not applicable
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
Justin_Cooperm2
Level 10

Please see this thread:

Marketo Removing Code for Image Scaling for Outlook at 125%dpi

We have resolved this issue and can enable the fix for your subscription if you're interested. Please see the comments in the idea above for more details.

Dan_Stevens_
Level 10 - Champion Alumni

I just finished testing... AND IT WORKS!!!!  Thanks so much, Justin!  BTW, it's not just the DOCTYPE that caused the issues, but Marketo was also stripping the xmlns definitions within the <HTML> tag, just after the DOCTYPE.  These critical three lines of code are now also being preserved.

Anonymous
Not applicable
This is also an issue for our company. Some of our templates need a background image on a table cell so that we can float editable marketo text above it. Marketo's only alternative seems to be to add the Outlook targetted comments into each and every instance of the template. This almost defeats the purpose of using templates, the marketing team who I make these templates for does not have the coding know-how to do this each and every time and it limits their ability to run campaigns. It seems like at the very least there should be an option not to have the comments removed from my email templates on approval.
Anonymous
Not applicable
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.  


Anonymous
Not applicable
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

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
Stephanie, Rachelle, and Nelson – I'm glad I'm not the only one who thinks this a problem!
Anonymous
Not applicable
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
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
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
Subscribing. Have a ticket filed with Support about this.
Anonymous
Not applicable
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.