From ab1df059d97dc80d52a7f932a7b431e558197844 Mon Sep 17 00:00:00 2001 From: kink Date: Tue, 23 Mar 2004 10:39:24 +0000 Subject: [PATCH] Fix quote_imap, the ereg pattern wasn't always interpreted right due to the escaping of backslashes. I've replaced it with the faster preg_replace and used double quotes to lessen the escaping confusion. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6849 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/strings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/strings.php b/functions/strings.php index e295c4c9..4ff54b89 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -458,7 +458,7 @@ function GenerateRandomString($size, $chars, $flags = 0) { * @return string the escaped string */ function quoteimap($str) { - return ereg_replace('(["\\])', '\\\\1', $str); + return preg_replace("/([\"\\\\])/", "\\\\$1", $str); } /** -- 2.25.1