summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-02-24 05:44:41 +0100
committerByron Jones <glob@mozilla.com>2015-02-24 05:44:41 +0100
commita67602b73f71192da0e2782545c27ceae3489fe2 (patch)
tree431ecf0484b607c86f8876ab70f91ed61a67abe0 /Bugzilla/Template.pm
parentf193116a4f38a4d3c8a9e5f7da3006a6f006448d (diff)
downloadbugzilla-a67602b73f71192da0e2782545c27ceae3489fe2.tar.gz
bugzilla-a67602b73f71192da0e2782545c27ceae3489fe2.tar.xz
Bug 1134743: javascript filter should escape uncode line and paragraph separators (causes "Unterminated string literal" javascript error)
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 17d4008f7..94dcdb85d 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -760,6 +760,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/</\\x3c/g;
$var =~ s/>/\\x3e/g;