Browse Source

Make js escaping compatible with magic_quotes_sybase (#1616953),
thanks Tomas Kuliavas

Thijs Kinkhorst 18 years ago
parent
commit
eb6c67fd28
1 changed files with 2 additions and 1 deletions
  1. 2 1
      plugins/squirrelspell/modules/check_me.mod

+ 2 - 1
plugins/squirrelspell/modules/check_me.mod

@@ -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";