Mustachejs render html markup as html

We convert the old CMS using Mustachejs. The BODY of the content contains some html elements:

<strong>Mickey Mouse</strong> is a funny animal cartoon character created in 1928 by Walt Disney.

We apply the value to Mustachejs as {{Description}}

Inferred conclusion

<strong>Mickey Mouse</strong> is a funny animal cartoon character
created in 1928 by Walt Disney.

Mustachejs literally displays the value as it is in the database.

How do we get Mustachejs to render html markup as html?

Desired Result

Mickey Mouse is a funny animal cartoon character created in 1928 by Walt Disney.

+5
source share
1 answer

This does not literally display the value as it is in db, it encodes it. It actually outputs

&lt;strong&gt;Mickey Mouse&lt;/strong&gt;

Use {{{three_braces}}} to adopt Mustache without html-string encoding. {{{Description}}}

+19
source

All Articles