handlebars.jsassemble

What does `{{{variable}}}` mean in handlebars?


What does triple curly braces mean in handlebars template syntax?

For example

{{{variable}}}

I cannot find any documentation.

Thanks


Solution

  • Because it was originally designed to generate HTML, Handlebars escapes values returned by a {{expression}}. If you don't want Handlebars to escape a value, use the "triple-stash", {{{.

    Source: https://handlebarsjs.com/guide/#html-escaping
    Found via: https://github.com/wycats/handlebars-site/issues/28