javascript - Mustache renders actual HTML tags in the dom? -
i have simple mustache function grabs template, process , use $().append insert need to.
the problem renders html tags instead of text.
instead of :
paragraph1... paragraph2... it (actually shows html tags):
<p>paragraph1</p> <p>paragraph2</p> my mustache function:
$.get(baseurl+"js_temp/template.html", function(templates) { tab.append(mustache.render(templates, templatedata)); }); template.html:
<div> {{content}} </div> pretty standard stuff... , worked fine until 2 days ago... , can't figure out have done cause this.
can point me in right direction of why might happening?
thank you!
perhaps try using 3 {{{content}}}?
all variables html-escaped default. if want render unescaped html, use triple mustache:
{{{name}}}. can use & unescape variable.
i got on git repo mustache.
Comments
Post a Comment