最佳答案
有没有一种方法可以将带有HTML标签的字符串插入到Handlebars模板中,而不会在输出字符串中转义标签?
模板.JS:
<p>{{content}}</p>
使用模板
HBS.template({content: "<i>test</i> 123"})
实际结果:
<p><i>test</i> 123</p>
预期结果:
<p><i>test</i> 123</p>