From 85c1d41dad06574a3d48e2795d6c290c221f17c0 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 4 Jun 2015 21:46:42 +0800 Subject: [PATCH] Bug 1134743: javascript filter should escape unicode line and paragraph separators (causes "Unterminated string literal" javascript error) r=dylan,a=glob --- Bugzilla/Template.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index acfc5a50f0..72d899c4d7 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -631,6 +631,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; -- 2.47.2