WE_Frontend::Plugin::JS - filters for quoting and escaping javascript
In a template:
[% USE JS %] var foo = "[% variable | js_q %]"; var bar = unescape("[% variable | js_escape %]");
This package contains to filters to make supplied variables safe for inclusion as a javascript string. The two available filters are js_q, which escapes special characters with backslashes, and js_escape, which creates a UTF8-escaped string which has to be unescaped with javascript's unescape function.
Slaven Rezic
To install WE::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WE::DB
CPAN shell
perl -MCPAN -e shell install WE::DB
For more information on module installation, please visit the detailed CPAN module installation guide.