forked from umakantp/jsmart
-
Notifications
You must be signed in to change notification settings - Fork 2
escapeHtml
pfaciana edited this page Sep 25, 2019
·
2 revisions
Escape HTML markup in template variables. By default is false (don't escape HTML).
jSmart.prototype.escapeHtml = true; //set global for all jSmart instances
var t = new jSmart('{$bold}', { escapeHtml: true }); //... or set for this instance only, overrides jSmart.prototype.escapeHtml
t.fetch({bold: '<b>test</b>'});
Output:
<b>test</b>
Older versions of jSmart below 3.0.0. please read (https://github.com/umakantp/jsmart/wiki/escape_html)[https://github.com/umakantp/jsmart/wiki/escape_html]