Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ICANHAZ.js render dom element instead of text

Param:

'<div class="someclass">' + somecontent + '</div>' + somecontent2

Template:

<div>{{ param }}</div>

And in browser I have:

&lt;div class="someclass"&gt; somecontent &lt;/div&gt;somecontent2

How to isolate .someclass, that it render as a dom element, not text?

like image 882
xquezme Avatar asked Sep 20 '11 09:09

xquezme


1 Answers

I think all Html elements are escaped by default. To return un-escaped Html use the triple mustache:

<div>{{{param}}}</div>
like image 178
Tron5000 Avatar answered Sep 28 '22 06:09

Tron5000