Skip to content

Commit

Permalink
Bug 1134743: javascript filter should escape uncode line and paragrap…
Browse files Browse the repository at this point in the history
…h separators (causes "Unterminated string literal" javascript error)

r=dylan,a=glob
  • Loading branch information
globau committed Feb 24, 2015
1 parent a3da37a commit 88e4275
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Bugzilla/Template.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 88e4275

Please sign in to comment.