Help Desk

Submit a ticket My Tickets
Welcome
Login

How do I escape special characters with Handlebars?

Handlebars is a language that was designed to dynamically generate HTML. As such, special character such as " & < > ` are automatically converted to the equivalent HTML code. To prevent the conversion, simply wrap your values with triple curly braces (a.k.a "triple-stash").

Handlebars Template Syntax:

Converted to HTML:  {{specialChars}}
No Conversion:      {{{specialChars}}}

Handlebars Configuration with JSON Variables:

Handlebars Output:

As always, we welcome questions on this post or feel free to contact us at support@onecloud.io.

Login to post a comment