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