diff -Nru libtemplate-plugin-javascript-perl-0.01/Changes libtemplate-plugin-javascript-perl-0.02/Changes --- libtemplate-plugin-javascript-perl-0.01/Changes 2004-08-19 16:00:39.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/Changes 2010-12-15 19:42:43.000000000 +0000 @@ -1,4 +1,7 @@ Revision history for Perl extension Template::Plugin::JavaScript +0.02 Wed Dec 15 11:42:31 PST 2010 + - Escapes HTML tags too (cho45) + 0.01 Fri Aug 20 01:00:39 2004 - original version diff -Nru libtemplate-plugin-javascript-perl-0.01/debian/changelog libtemplate-plugin-javascript-perl-0.02/debian/changelog --- libtemplate-plugin-javascript-perl-0.01/debian/changelog 2010-12-27 21:02:33.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/debian/changelog 2010-12-25 15:54:55.000000000 +0000 @@ -1,3 +1,20 @@ +libtemplate-plugin-javascript-perl (0.02-1) unstable; urgency=low + + [ Jonathan Yu ] + * New upstream release + * Standards-Version 3.9.1 (no changes) + * Use new 3.0 (quilt) source format + + [ Salvatore Bonaccorso ] + * debian/control: Changed: Replace versioned (build-)dependency on + perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as + permitted by Debian Policy 3.8.3). + + [ Ryan Niebur ] + * Update jawnsy's email address + + -- Jonathan Yu Fri, 24 Dec 2010 20:36:49 -0500 + libtemplate-plugin-javascript-perl (0.01-1) unstable; urgency=low * Initial Release (Closes: #515636) diff -Nru libtemplate-plugin-javascript-perl-0.01/debian/control libtemplate-plugin-javascript-perl-0.02/debian/control --- libtemplate-plugin-javascript-perl-0.01/debian/control 2010-12-27 21:02:33.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/debian/control 2010-12-25 15:54:55.000000000 +0000 @@ -2,11 +2,11 @@ Section: perl Priority: optional Build-Depends: debhelper (>= 7) -Build-Depends-Indep: perl (>= 5.6.0-16), libtemplate-perl +Build-Depends-Indep: perl, libtemplate-perl Maintainer: Debian Perl Group Uploaders: Maximilian Gaß , - Jonathan Yu -Standards-Version: 3.8.2 + Jonathan Yu +Standards-Version: 3.9.1 Homepage: http://search.cpan.org/dist/Template-Plugin-JavaScript/ Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libtemplate-plugin-javascript-perl/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libtemplate-plugin-javascript-perl/ diff -Nru libtemplate-plugin-javascript-perl-0.01/debian/copyright libtemplate-plugin-javascript-perl-0.02/debian/copyright --- libtemplate-plugin-javascript-perl-0.01/debian/copyright 2010-12-27 21:02:33.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/debian/copyright 2010-12-25 15:54:55.000000000 +0000 @@ -1,34 +1,35 @@ -Format-Specification: - http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 -Upstream-Maintainer: Tatsuhiko Miyagawa -Upstream-Source: http://search.cpan.org/dist/Template-Plugin-JavaScript/ -Upstream-Name: Template-Plugin-JavaScript +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Maintainer: Tatsuhiko Miyagawa +Source: http://search.cpan.org/dist/Template-Plugin-JavaScript/ +Name: Template-Plugin-JavaScript Files: * -Copyright: 2004, Tatsuhiko Miyagawa -License-Alias: Perl -License: Artistic | GPL-1+ +Copyright: 2004-2010, Tatsuhiko Miyagawa +License: Artistic or GPL-1+ X-Comment: Rationale from the author was: All of my modules available at http://search.cpan.org/~miyagawa/ with the statement "AUTHOR: Tatsuhiko Miyagawa" are, unless otherwise noted, Copyright (c) Tatsuhiiko Miyagawa. + Source: http://bulknews.net/debian.txt (author's web site) The exact year comes from the CPAN upload date. Files: debian/* -Copyright: 2009, Jonathan Yu +Copyright: 2009-2010, Jonathan Yu 2009, Maximilian Gaß -License: Artistic | GPL-1+ +License: Artistic or GPL-1+ License: Artistic - This program is free software; you can redistribute it and/or modify - it under the terms of the Artistic License, which comes with Perl. - On Debian GNU/Linux systems, the complete text of the Artistic License - can be found in `/usr/share/common-licenses/Artistic' + This program is free software; you can redistribute it and/or modify + it under the terms of the Artistic License, which comes with Perl. + . + On Debian systems, the complete text of the Artistic License can be + found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL' + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + . + On Debian systems, the complete text of version 1 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-1'. diff -Nru libtemplate-plugin-javascript-perl-0.01/debian/source/format libtemplate-plugin-javascript-perl-0.02/debian/source/format --- libtemplate-plugin-javascript-perl-0.01/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/debian/source/format 2010-12-27 21:02:33.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru libtemplate-plugin-javascript-perl-0.01/lib/Template/Plugin/JavaScript.pm libtemplate-plugin-javascript-perl-0.02/lib/Template/Plugin/JavaScript.pm --- libtemplate-plugin-javascript-perl-0.01/lib/Template/Plugin/JavaScript.pm 2004-08-19 16:10:51.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/lib/Template/Plugin/JavaScript.pm 2010-12-15 19:44:01.000000000 +0000 @@ -2,7 +2,7 @@ use strict; use vars qw($VERSION); -$VERSION = '0.01'; +$VERSION = '0.02'; require Template::Plugin; use base qw(Template::Plugin); @@ -21,11 +21,15 @@ local $_ = shift; return '' unless defined $_; + s!\\!\\\\!g; s!(['"])!\\$1!g; s!\n!\\n!g; s!\f!\\f!g; s!\r!\\r!g; s!\t!\\t!g; + s!!\\x3e!g; + s!&!\\x26!g; $_; } diff -Nru libtemplate-plugin-javascript-perl-0.01/META.yml libtemplate-plugin-javascript-perl-0.02/META.yml --- libtemplate-plugin-javascript-perl-0.01/META.yml 2004-08-19 16:12:13.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/META.yml 2010-12-15 19:44:06.000000000 +0000 @@ -1,12 +1,22 @@ -# http://module-build.sourceforge.net/META-spec.html -#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# -name: Template-Plugin-JavaScript -version: 0.01 -version_from: lib/Template/Plugin/JavaScript.pm -installdirs: site +--- #YAML:1.0 +name: Template-Plugin-JavaScript +version: 0.02 +abstract: ~ +author: [] +license: unknown +distribution_type: module +configure_requires: + ExtUtils::MakeMaker: 0 +build_requires: + ExtUtils::MakeMaker: 0 requires: - Template: 0 - Test::More: 0.32 - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.17 + Template: 0 + Test::More: 0.32 +no_index: + directory: + - t + - inc +generated_by: ExtUtils::MakeMaker version 6.56 +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 diff -Nru libtemplate-plugin-javascript-perl-0.01/t/01_test.t libtemplate-plugin-javascript-perl-0.02/t/01_test.t --- libtemplate-plugin-javascript-perl-0.01/t/01_test.t 2004-08-19 16:12:05.000000000 +0000 +++ libtemplate-plugin-javascript-perl-0.02/t/01_test.t 2010-12-15 19:41:09.000000000 +0000 @@ -1,6 +1,8 @@ use strict; use Template::Test; +use lib 'lib'; + test_expect(\*DATA); __END__ @@ -12,3 +14,32 @@ --expect-- document.write("\nHere\'s some text going on.\n"); +--test-- +[% USE JavaScript -%] +document.write("[% FILTER js %] +You & I +[% END %]"); +--expect-- +document.write("\nYou \x26 I\n"); + +--test-- +[% USE JavaScript -%] +var t = "[% FILTER js %] +\"+alert(1)// +[% END %]"; +--expect-- +var t = "\n\\\"+alert(1)//\n"; + +--test-- +[% USE JavaScript -%] + +--expect-- + +