瀏覽代碼

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