Menu icon Foundation
Is there a fix for non-Handlebars code?

I am creating email templates using Foundation for Emails that have code that will be processed by Adobe Campaign and sent to customers. The problem is that Adobe uses a template language that Handlebars is mangling.

If I use something like:
<%= include view='Footer' %>

Handlebars adds in quotes:
<%= include="" view="'Footer'" %="">

The only way I have found to overcome this to swap with ASCII code:
<%= include view=&#39;Footer&#39; %>

This is cumbersome because I have some emails that have nothing but lines of code like this and it's tedious to have to convert every single bit of code.

I have tried using raw.js to add the code so it isn't processed, but that is not helping. I add in this:

{{{{raw}}}}<%@ include view='Footer' %>{{{{/raw}}}}

And I still get this:
<%= include="" view="'Footer'" %="">

Any suggestions to a fix I might have overlooked?

Handlebarsraw.jsemail

I am creating email templates using Foundation for Emails that have code that will be processed by Adobe Campaign and sent to customers. The problem is that Adobe uses a template language that Handlebars is mangling.

If I use something like:
<%= include view='Footer' %>

Handlebars adds in quotes:
<%= include="" view="'Footer'" %="">

The only way I have found to overcome this to swap with ASCII code:
<%= include view=&#39;Footer&#39; %>

This is cumbersome because I have some emails that have nothing but lines of code like this and it's tedious to have to convert every single bit of code.

I have tried using raw.js to add the code so it isn't processed, but that is not helping. I add in this:

{{{{raw}}}}<%@ include view='Footer' %>{{{{/raw}}}}

And I still get this:
<%= include="" view="'Footer'" %="">

Any suggestions to a fix I might have overlooked?

Rafi Benkual over 2 years ago

You can wrap the code inte the raw helper 

{{{{raw}}}} code {{{{/raw}}}}

Corey Schaaf over 2 years ago

@rafi he's saying he's already tried that above ... I'd be interested to know how to handle this as well because I have a issue with the inliner doing the same thing ... similar to a bug that is open in git about this. 

https://github.com/zurb/foundation-emails/issues/532

 

and a bug I opened about this as well ... 


https://github.com/zurb/foundation-emails/issues/417