You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a piece of json data, which contains html tags as string:
{"key" : "<p>this is the data</p><br><ul><li>This is the list-item</li></ul>"}
I use handlebars to get the data. The ideal output should be:
This is the data
This is the list-item
I used {{key}} at first, but the output contains the html tags as plain text:
<p>this is the data</p><br><ul><li>This is the list-item</li></ul>
In the end, the triple stash {{{key}}} helped me solve the problem and achieved the ideal output. However, I have no idea why it works. Could someone please explain the reason behind to me? Thank you in advance.
Activity
huideaki commentedon May 6, 2021
https://handlebarsjs.com/guide/expressions.html#html-escaping
The explaination should be what u are looking for here