3

I'm using https://foundation.zurb.com/emails.html to develop my email templates. For each and every template there are parts where I need to add eg. <%= params.someData %> but '<' gets escaped while compiling, so instead of being <%= params.someData %> it generates to &lt;%= params.firstName %>

I see that https://foundation.zurb.com/sites/docs/panini.html is used for compiling but I'm not able to disabled this functionality in order for < character not to be escaped.

Please help.

albert
  • 8,112
  • 3
  • 47
  • 63
Edin Puzic
  • 998
  • 2
  • 19
  • 39

2 Answers2

4

You can use the integrated raw helper to do this.

Either use {{{{raw}}}}...{{{{/raw}}}} or <raw>...</raw>.

1

In gulfile.babel.js use pipe to replace &lt;%= with <%=. I have had to do this with Adobe Campaign code, which doesn't work well with Zurb Foundation for email.

.pipe($.replace, '&lt;%=', `<%=`)

Good luck.

gwally
  • 3,349
  • 2
  • 14
  • 28
  • 1
    Better use the raw helper ;-) –  Dec 29 '18 at 19:56
  • @DanielRuf I could never get the raw helper to work with my issues with formatting. Zurb didn't have any solutions. I think there is a known problem. Pipe was the only thing that worked. – gwally Jan 02 '19 at 05:48