SOLVED

Content stripped out of email

Go to solution
Anonymous
Not applicable

Content stripped out of email

Anyone else encountered this issue? We had an email template that was working fine up until the other day when it was sent out with a big chunk of the content missing. After a half hearted effort from Marketo support suggested it was a CSS error, I did a bit more digging and discovered that the cause was the fact that anything following ### on a line of html was suddenly being stripped out of the email message when it was sent by Marketo. So the content looked fine in the web preview, it was just the actual send process within Marketo which was removing content.

I recreated the issue by creating a template from scratch and using the string ### in several places and it had the same results.

See below, I've pasted the source of the template and attached a screen shot of how the message looks in the web preview and then how it looks when actually sent. Funny that Marketo thought this could be a CSS issue...

It would pay to double check your emails are coming out as expected, as ### is a common strong to be put in comments of email templates to highlight changes in sections and since Marketo seem to have no idea of this "functionality" it may also be that other strings are now mysteriously being stripped out.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

  <head>

    <title>Your Email Title</title>

  </head>

  <body>

    <div style="font: 14px helvetica; width: 100%" class="mktEditable" id="edit_text">

      Click HTML Source above to insert HTML<br />

This is some content<br />

<!-- this is a comment with some hashes ### this is content following three hashes -->

This is some content following the comment with hashes in it.<br />

<!-- this is another comment -->

This is some content following the second comment.<br />

<br />

This is some content with hashes in it ### this is content after the hashes<br />

    </div>

  </body>

</html>

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Content stripped out of email

Hello Kai,

I apologize this may not have been articulated by Marketo in a complete manner.  Our email servers run Apache script.  This is how our Email Script tokens work.  The hash tag character is a reserved character in Apache Script.   This is an identifier to 'do something'.  Set a variable, run a control statement like 'IF' or 'WHILE'.  So when the server is processing the email it comes across the symbol and attempts to 'do something'.

In this case the 'something' ends up being nothing since it does not understand what follows the first hash tag.  Velocity script considers ## a comment start, so the remaining content is gone until it encounters the newline character in the script.

I have tried a number of workarounds using our Scripting Tokens (Velocity Script), without success.  The easy was should be:

#[[###]]#

This should render

###

But that does not work with the editor.  Using the escape tools in velocity also do not work.

https://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/EscapeTool.html#du...

Simply put, there is not the ability to use multiple hashtags in sequence.  If there is a way to use another character I suggest this route. 

I hope this helps clarify the limitation.

Thank you,

James Zeigler

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Re: Content stripped out of email

Hello Kai,

I apologize this may not have been articulated by Marketo in a complete manner.  Our email servers run Apache script.  This is how our Email Script tokens work.  The hash tag character is a reserved character in Apache Script.   This is an identifier to 'do something'.  Set a variable, run a control statement like 'IF' or 'WHILE'.  So when the server is processing the email it comes across the symbol and attempts to 'do something'.

In this case the 'something' ends up being nothing since it does not understand what follows the first hash tag.  Velocity script considers ## a comment start, so the remaining content is gone until it encounters the newline character in the script.

I have tried a number of workarounds using our Scripting Tokens (Velocity Script), without success.  The easy was should be:

#[[###]]#

This should render

###

But that does not work with the editor.  Using the escape tools in velocity also do not work.

https://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/EscapeTool.html#du...

Simply put, there is not the ability to use multiple hashtags in sequence.  If there is a way to use another character I suggest this route. 

I hope this helps clarify the limitation.

Thank you,

James Zeigler