فهرست منبع

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 سال پیش
والد
کامیت
67b3f9cb87
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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);
 }
 
 /**