Commit 85c1d41d authored by Byron Jones's avatar Byron Jones

Bug 1134743: javascript filter should escape unicode line and paragraph…

Bug 1134743: javascript filter should escape unicode line and paragraph separators (causes "Unterminated string literal" javascript error) r=dylan,a=glob
parent 42ae6d05
......@@ -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/</\\x3c/g;
$var =~ s/>/\\x3e/g;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment