From: Byron Jones Date: Tue, 24 Feb 2015 05:20:35 +0000 (+0800) Subject: Bug 1134743: javascript filter should escape uncode line and paragraph separators... X-Git-Tag: bugzilla-5.0rc3~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59fcd310de5899533858e6b47c6f8dd77026c92e;p=thirdparty%2Fbugzilla.git Bug 1134743: javascript filter should escape uncode line and paragraph separators (causes "Unterminated string literal" javascript error) r=dylan,a=glob --- diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 078a8a0d6c..f909f5f0d7 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -793,6 +793,8 @@ sub create { $var =~ s/([\\\'\"\/])/\\$1/g; $var =~ s/\n/\\n/g; $var =~ s/\r/\\r/g; + $var =~ s/\x{2028}/\\u2028/g; # unicode line separator + $var =~ s/\x{2029}/\\u2029/g; # unicode paragraph separator $var =~ s/\@/\\x40/g; # anti-spam for email addresses $var =~ s//\\x3e/g;