* the interface window.
*
* @author Konstantin Riabitsev <icon at duke.edu>
- * @copyright © 1999-2006 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
/**
* Declaring globals for users with E_ALL set.
*/
-global $SQSPELL_APP_DEFAULT, $SQSPELL_APP, $SQSPELL_SPELLCHECKER,
+global $SQSPELL_APP_DEFAULT, $SQSPELL_APP, $SQSPELL_SPELLCHECKER,
$SQSPELL_FORCE_POPEN, $attachment_dir, $color;
if (! sqgetGlobalVar('sqspell_text',$sqspell_text,SQ_POST)) {
*/
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>';
*/
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>';
}
} 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");
}
*/
$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";
*/
$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++;
*/
$extrajs.= "var locations= new Array();\n";
$i=0;
- while (list($word, $value) = each($locations)){
+ foreach ($locations as $value){
$extrajs.= "locations[$i] = \"$value\";\n";
$i++;
}
/**
- * Did I mention that I hate dots on the end of contcatenated lines?
+ * Did I mention that I hate dots on the end of concatenated lines?
* Dots at the beginning make so much more sense!
*/
$extrajs.= "//-->\n"