1Template::Plugin::JavaSUcsreirptC(o3n)tributed Perl DocuTmeemnptlaattieo:n:Plugin::JavaScript(3)
2
3
4

NAME

6       Template::Plugin::JavaScript - Encodes text to be safe in JavaScript
7

SYNOPSIS

9         [% USE JavaScript %]
10         <script type="text/javascript">
11         document.write("[% sometext | js %]");
12         </script>
13

DESCRIPTION

15       Template::Plugin::JavaScript is a TT filter that filters text so it can
16       be safely used in JavaScript quotes.
17
18         [% USE JavaScript %]
19         document.write("[% FILTER js %]
20         Here's some text going on.
21         [% END %]");
22
23       will become:
24
25         document.write("\nHere\'s some text going on.\n");
26

AUTHOR

28       The original idea comes from Movable Type's "encode_js" global filter.
29
30       Tatsuhiko Miyagawa <miyagawa@bulknews.net>
31
32       This library is free software; you can redistribute it and/or modify it
33       under the same terms as Perl itself.
34

SEE ALSO

36       Apache::JavaScript::DocumentWrite
37
38
39
40perl v5.32.1                      2021-01-27   Template::Plugin::JavaScript(3)
Impressum