From d9f83cf8cd23f773fde77e3233a10a07aa64b37b Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 4 Mar 2011 01:19:33 +0000 Subject: [PATCH] Don't use regular expressions when you don't need to git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14090 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 fcc61b92..08f1930c 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -731,7 +731,7 @@ function GenerateRandomString($size, $chars, $flags = 0) { * @since 1.0.3 */ function quoteimap($str) { - return preg_replace("/([\"\\\\])/", "\\\\$1", $str); + return str_replace(array('\\', '"'), array('\\\\', '\\"'), $str); } /** -- 2.25.1