diff options
author | Byron Jones <glob@mozilla.com> | 2015-02-24 05:44:41 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-02-24 05:44:41 +0100 |
commit | a67602b73f71192da0e2782545c27ceae3489fe2 (patch) | |
tree | 431ecf0484b607c86f8876ab70f91ed61a67abe0 /Bugzilla/Template.pm | |
parent | f193116a4f38a4d3c8a9e5f7da3006a6f006448d (diff) | |
download | bugzilla-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.pm | 2 |
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; |