HTML EscapingHandlebars will not escape a Handlebars.
Templates The recommended way of adding templates to your page is by including them in <script> tags with a special type. The type attribute is important, otherwise the browser will attempt to parse them as JavaScript (which they are not). The templates have an easy to grasp syntax.
Handlebars. js is a templating engine similar to the ejs module in node. js, but more powerful and simple to use. It ensures minimum templating and is a logicless engine that keeps the view and the code separated. It can be used with express as the hbs module, available through npm.
Try like
<p>{{{content}}}</p>
official reference:
Handlebars HTML-escapes values returned by a
{{expression}}
. If you don't want Handlebars to escape a value, use the "triple-stash",{{{
.
In your template you must add triple mustaches like this. <p>{{{content}}}</p>
According to Handlebars documentation, http://handlebarsjs.com/expressions.html
Quote from documentation,
If you don't want Handlebars to escape a value, use the "triple-stash",
{{{
Pass the raw HTML to Handlebars template and get the raw HTML output by using triple brackets.
{{{foo}}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With