From: lkehresman Date: Thu, 3 Aug 2000 10:38:43 +0000 (+0000) Subject: fixed some quoting problems in searching and message highlighting X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=acb61cb47119d22ce54765afefe1330e14fb07d7 fixed some quoting problems in searching and message highlighting form submissions git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@671 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/options_highlight.php b/src/options_highlight.php index 1a4a8fcb..8529ab6a 100644 --- a/src/options_highlight.php +++ b/src/options_highlight.php @@ -32,6 +32,9 @@ } else if ($action == "save") { if (!$theid) $theid = 0; $identname = ereg_replace(",", " ", $identname); + $identname = str_replace("\\\\", "\\", $identname); + $identname = str_replace("\\\"", "\"", $identname); + $identname = str_replace("\"", """, $identname); if ($color_type == 1) $newcolor = $newcolor_choose; else $newcolor = $newcolor_input; @@ -39,6 +42,10 @@ $newcolor = ereg_replace("#", "", $newcolor); $newcolor = "$newcolor"; $value = ereg_replace(",", " ", $value); + $value = str_replace("\\\\", "\\", $value); + $value = str_replace("\\\"", "\"", $value); + $value = str_replace("\"", """, $value); + setPref($data_dir, $username, "highlight$theid", $identname.",".$newcolor.",".$value.",".$match_type); $message_highlight_list[$theid]["name"] = $identname; $message_highlight_list[$theid]["color"] = $newcolor; @@ -115,7 +122,11 @@ echo _("Identifying name") . ":"; echo " \n"; echo " \n"; - echo " "; + $disp = $message_highlight_list[$theid]["name"]; + $disp = str_replace("\\\\", "\\", $disp); + $disp = str_replace("\\\"", "\"", $disp); + $disp = str_replace("\"", """, $disp); + echo " "; echo " \n"; echo " \n"; echo "  \n"; @@ -163,7 +174,11 @@ if ($message_highlight_list[$theid]["match_type"] == "subject") echo "