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;
最后更新: 2020/1/11 15:46:21