Handlebars:
Template
raw: {{{specialChars}}}
html-escaped: {{specialChars}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{ specialChars: "& < > \" ' ` =" }
Output
raw: & < > " ' ` =
html-escaped: &amp; &lt; &gt; &quot; &#x27; &#x60; &#x3D;
最后更新: 1/11/2020, 3:46:21 PM