default modifiers

21 views
Skip to first unread message

Ryan

unread,
Jan 2, 2012, 10:12:46 PM1/2/12
to jSmart - JavaScript template engine with Smarty syntax
Hello,

I found jSmart today and think it's an interesting idea. Does jSmart
support the ability to set default modifiers like Smarty does? For
example, I set Smarty to automatically html escape all variables by
making escape:"htmlall" be a default modifier as described on:

http://www.smarty.net/docsv2/en/variable.default.modifiers.tpl

Thanks,
Ryan

Max Miroshnikov

unread,
Jan 4, 2012, 5:18:16 AM1/4/12
to jSmart - JavaScript template engine with Smarty syntax
Hi,
default modifiers, filters etc. will be supported in the next release.
I hope it will be ready after January 10.
For now, you can use:

jSmart.prototype.escape_html = true;
var tpl = new jSmart(someTplText);
...
http://www.smarty.net/docs/en/variable.escape.html.tpl

Regards,
Max
Reply all
Reply to author
Forward
0 new messages