diff --git a/class.phpmailer.php b/class.phpmailer.php index 8d6c291fe..9220895b7 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -2910,11 +2910,7 @@ public function msgHTML($message, $basedir = '', $advanced = false) } $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 if ($this->addStringEmbeddedImage($data, $cid, '', 'base64', $match[1])) { - $message = preg_replace( - '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', - $images[1][$imgindex] . '="cid:' . $cid . '"', - $message - ); + $message = str_replace($images[0][$imgindex], $images[1][$imgindex] . '="cid:' . $cid . '"', $message); } } elseif (!preg_match('#^[A-z]+://#', $url)) { // Do not change urls for absolute images (thanks to corvuscorax)