Handlebars:
Template
{{link "See Website" url}}
Preparation-Script
Handlebars.registerHelper("link", function(text, url) {
      var url = Handlebars.escapeExpression(url),
          text = Handlebars.escapeExpression(text)
          
     return new Handlebars.SafeString("<a href='" + url + "'>" + text +"</a>");
});
Input
{ url: "https://yehudakatz.com/" }
Output
<a href='https://yehudakatz.com/'>See Website</a>
最后更新: 2020/1/11 15:46:21