summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-02-24 06:17:16 +0100
committerByron Jones <glob@mozilla.com>2015-02-24 06:17:16 +0100
commit88e42751a27c1f6d3e341a57dde58a06bfd91af6 (patch)
tree3cdf826d804970b3031527a2efc6e5cebfa066d6 /Bugzilla
parenta3da37a338f8a5dd133970e3c88a37ca80df59a4 (diff)
downloadbugzilla-88e42751a27c1f6d3e341a57dde58a06bfd91af6.tar.gz
bugzilla-88e42751a27c1f6d3e341a57dde58a06bfd91af6.tar.xz
Bug 1134743: javascript filter should escape uncode line and paragraph separators (causes "Unterminated string literal" javascript error)
r=dylan,a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm2
1 files changed, 2 insertions, 0 deletions
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/</\\x3c/g;
$var =~ s/>/\\x3e/g;