Happy New Year
[squirrelmail.git] / plugins / squirrelspell / modules / check_me.mod
index 327cb36173d3f05d7ff7fd9fb514d99b4cae19fe..38cc3bcfdf4bb5d6f16e28e32e8f5281a72c0c5a 100644 (file)
@@ -10,7 +10,7 @@
  * the interface window.
  *
  * @author Konstantin Riabitsev <icon at duke.edu>
- * @copyright 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2021 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -106,7 +106,7 @@ if ($SQSPELL_SPELLCHECKER===1) {
  */
 if (!empty($check->error)) {
   $msg= '<div style="text-align: center;">'
-      . nl2br(htmlspecialchars($check->error))
+      . nl2br(sm_encode_html_special_chars($check->error))
      . '<form onsubmit="return false">'
      . '<input type="submit" value="  ' . _("Close")
      . '  " onclick="self.close()" /></form></div>';
@@ -125,7 +125,7 @@ $results = $check->check_text($sqspell_new_text);
  */
 if (!empty($check->error)) {
   $msg= '<div style="text-align: center;">'
-      . nl2br(htmlspecialchars($check->error))
+      . nl2br(sm_encode_html_special_chars($check->error))
      . '<form onsubmit="return false">'
      . '<input type="submit" value="  ' . _("Close")
      . '  " onclick="self.close()" /></form></div>';
@@ -153,7 +153,7 @@ if (is_array($results)) {
     }
 } else {
     if (!empty($check->error)) {
-        $error_msg = nl2br(htmlspecialchars($check->error));
+        $error_msg = nl2br(sm_encode_html_special_chars($check->error));
     } else {
         $error_msg = _("Unknown error");
     }
@@ -183,7 +183,7 @@ if ($errors){
   for ($i=0; $i<sizeof($sqspell_lines); $i++){
     // use addcslashes for compatibility with magic_quotes_sybase
     $extrajs.= "sqspell_lines[$i] = \""
-      . chop(addcslashes($sqspell_lines[$i], "'\"\\\x0")) . "\";\n";
+      . chop(addcslashes($sqspell_lines[$i], ">'\"\\\x0")) . "\";\n";
   }
   $extrajs.= "\n\n";
 
@@ -201,7 +201,7 @@ if ($errors){
    */
   $extrajs.= "var suggestions = new Array();\n";
   $i=0;
-  while (list($word, $value) = each($misses)){
+  foreach ($misses as $value){
     if ($value=='_NONE') $value='';
     $extrajs.= "suggestions[$i] = \"$value\";\n";
     $i++;
@@ -213,7 +213,7 @@ if ($errors){
    */
   $extrajs.= "var locations= new Array();\n";
   $i=0;
-  while (list($word, $value) = each($locations)){
+  foreach ($locations as $value){
     $extrajs.= "locations[$i] = \"$value\";\n";
     $i++;
   }