Closed lukaszswdr closed 10 years ago
I think HTML is escaped always, even if you surround it with {{{ }}} For example, I have something like this as a content of data array:
<br><br>SomeText<div><a href="google.com">Link</a>
(above is only one element of an array) In template I do something like this:
{{#each data}} <article> <div>{{{content}}}</div> </article> {{/each}}
As an output I see HTML tags which are simply escaped, why is this happening? (I'm testing it on rails 4)
Solution is to use:
Handlebars.SafeString
I think HTML is escaped always, even if you surround it with {{{ }}} For example, I have something like this as a content of data array:
(above is only one element of an array) In template I do something like this:
As an output I see HTML tags which are simply escaped, why is this happening? (I'm testing it on rails 4)