简体   繁体   English

逃离Zurb基金会的电子邮件中的'<'字符

[英]Escaping '<' character in Foundation for Email, Zurb

I'm using https://foundation.zurb.com/emails.html to develop my email templates. 我正在使用https://foundation.zurb.com/emails.html来开发我的电子邮件模板。 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 %> <%= params.someData %>但是'<'在编译时被转义,因此它不是<%= params.someData %>而是生成到&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. 我看到https://foundation.zurb.com/sites/docs/panini.html用于编译,但我无法禁用此功能,以便<character不被转义。

Please help. 请帮忙。

You can use the integrated raw helper to do this. 您可以使用集成的原始帮助程序来执行此操作。

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

In gulfile.babel.js use pipe to replace &lt;%= with <%= . gulfile.babel.js使用管道替换&lt;%= with <%= I have had to do this with Adobe Campaign code, which doesn't work well with Zurb Foundation for email. 我不得不使用Adobe Campaign代码执行此操作,这与Zurb Foundation的电子邮件无法正常工作。

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

Good luck. 祝好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM