简体   繁体   中英

How to render italic/bold text using handlebars?

So here is the thing, I am using Handlebars to render the template on the page.

Now in the context js object, I have a paragraph, which should have few italic words,

For eg:

var context = {
 "event":"This is event name <i>XYZ</i>" 
}

And the paragraph is rendered as,

 This is event name <i>XYZ</i>

Is there any way I can make/escape the font italic/bold in Handlebarsjs/Mustachejs ??

Here is the fiddle

Thanks!

Try using the triple-stache

{{{thing_to_render_unescaped}}}

http://jsfiddle.net/a9dp62g4/1/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM