Slaven Rezić > WE_Framework-0.097_03 > WE_Frontend::Plugin::JS

Download:
WE_Framework-0.097_03.tar.gz

Dependencies

Annotate this POD

Module Version: 1.08   Source  

NAME ^

WE_Frontend::Plugin::JS - filters for quoting and escaping javascript

SYNOPSIS ^

In a template:

    [% USE JS %]
    var foo = "[% variable | js_q %]";
    var bar = unescape("[% variable | js_escape %]");

DESCRIPTION ^

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.

AUTHOR ^

Slaven Rezic

syntax highlighting: