Fix & in URLs to & for correctness of HTML, also 100% to "100%" in
[squirrelmail.git] / src / options_highlight.php
index edb6acd6e6ea3b66b7b1ed3b18910aed6e45a7fe..bade16cbd43665ec831639891a8339777ec54a87 100644 (file)
@@ -16,7 +16,7 @@ require_once('../functions/display_messages.php');
 require_once('../functions/imap.php');
 require_once('../functions/array.php');
 require_once('../functions/plugin.php');
-include_once('../functions/strings.php');
+require_once('../functions/strings.php');
 
 function oh_opt( $val, $sel, $tit ) {
     echo "<option value=\"$val\"";
@@ -38,16 +38,16 @@ if ($action == 'delete' && isset($theid)) {
     exit;
 } else if ($action == 'save') {
     if (!$theid) $theid = 0;
-    $identname = ereg_replace(',', ' ', $identname);
+    $identname = str_replace(',', ' ', $identname);
     if ($color_type == 1) $newcolor = $newcolor_choose;
     elseif ($color_type == 2) $newcolor = $newcolor_input;
     else $newcolor = $color_type;
 
-    $newcolor = ereg_replace(',', '', $newcolor);
-    $newcolor = ereg_replace('#', '', $newcolor);
-    $newcolor = ereg_replace('"', '', $newcolor);
-    $newcolor = ereg_replace('\'', '', $newcolor);
-    $value = ereg_replace(',', ' ', $value);
+    $newcolor = str_replace(',', '', $newcolor);
+    $newcolor = str_replace('#', '', $newcolor);
+    $newcolor = str_replace('"', '', $newcolor);
+    $newcolor = str_replace('\'', '', $newcolor);
+    $value = str_replace(',', ' ', $value);
 
     setPref($data_dir, $username, "highlight$theid", $identname.','.$newcolor.','.$value.','.$match_type);
     $message_highlight_list[$theid]['name'] = $identname;