Perl module to sanitize text for JavaScript

Template::Plugin::JavaScript is a Template Toolkit filter that automatically
sanitizes your text so it can be used safely in JavaScript quotes. You simply
enable the filter inside a JavaScript string, resulting in any metacharacters
being automatically escaped.