Make js escaping compatible with magic_quotes_sybase (#1616953),
[squirrelmail.git] / plugins / squirrelspell / modules / check_me.mod
index 35f27f7e5bf9e129894a25ba153118d546952753..7dac0f0f4586df19414eda816f85478ddd9fea43 100644 (file)
@@ -181,8 +181,9 @@ if ($errors){
    */
   $extrajs.= "var sqspell_lines=new Array();\n";
   for ($i=0; $i<sizeof($sqspell_lines); $i++){
+    // use addcslashes for compatibility with magic_quotes_sybase
     $extrajs.= "sqspell_lines[$i] = \""
-      . chop(addslashes($sqspell_lines[$i])) . "\";\n";
+      . chop(addcslashes($sqspell_lines[$i]), "'\"\\\x0") . "\";\n";
   }
   $extrajs.= "\n\n";