From: pdontthink Date: Fri, 4 Mar 2011 01:19:33 +0000 (+0000) Subject: Don't use regular expressions when you don't need to X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d9f83cf8cd23f773fde77e3233a10a07aa64b37b;p=squirrelmail.git 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 --- 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); } /**