From 88e42751a27c1f6d3e341a57dde58a06bfd91af6 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 24 Feb 2015 13:17:16 +0800 Subject: Bug 1134743: javascript filter should escape uncode line and paragraph separators (causes "Unterminated string literal" javascript error) r=dylan,a=glob --- Bugzilla/Template.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 066f9dc30..3f3d5f399 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -766,6 +766,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; -- cgit v1.2.3-24-g4f1b