Make js escaping compatible with magic_quotes_sybase (#1616953),
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 7 Jan 2007 15:48:48 +0000 (15:48 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 7 Jan 2007 15:48:48 +0000 (15:48 +0000)
thanks Tomas Kuliavas

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12094 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/squirrelspell/modules/check_me.mod

index 35f27f7..7dac0f0 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";