I am using a jQuery template to render some dynamic data. A simplified version of what I am trying to do can be seen below:
var data = [{html:<i>html</i>}, {html:<b>html2</b>}];
var tmpl = $.tmpl(<div>${html}</div>, data);
$("#someContainer").html(tmpl);
I want to render HTML as HTML (HTML in bold) but somehow it renders as plain text (<.b>html<./b>). Can someone explain why?
try using the
{{html}}marker:See docs here: html marker
_note: it’s html html twice because your var is named that