Browse Source

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.

Thijs Kinkhorst 21 years ago
parent
commit
67b3f9cb87
1 changed files with 1 additions and 1 deletions
  1. 1 1
      functions/strings.php

+ 1 - 1
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);
 }
 
 /**