diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-03-01 07:55:39 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-03-01 07:55:39 +0000 |
| commit | d2520bb31999b60cbf7e0c90ce59e6ca25af68b7 (patch) | |
| tree | de7ac4f4d0d3f92cece22f8f33c5253b4743ee5a | |
| parent | d6e6044656f733735c1afd1c30e3522e5ff3bbc6 (diff) | |
- Fix attaching more than nine inline images (#1485759)
git-svn-id: https://svn.roundcube.net/trunk@2320 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 4 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/sendmail.inc | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 946b25ea3..9a6b572b1 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,10 @@ CHANGELOG RoundCube Webmail --------------------------- +2009/03/01 (alec) +---------- +- Fix attaching more than nine inline images (#1485759) + 2009/02/27 (thomasb) ---------- - Fix mime-type detection using a hard-coded map (#1485311) diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index b16226075..eb81fc9ad 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -337,11 +337,11 @@ $transfer_encoding = in_array(strtoupper($message_charset), $charset_7bit) ? '7b if (is_array($_SESSION['compose']['attachments'])) foreach ($_SESSION['compose']['attachments'] as $id => $attachment) { - $dispurl = '/\ssrc\s*=\s*[\'"]?\S+display-attachment\S+file=rcmfile' . $id . '[\'"]?/'; - $match = preg_match($dispurl, $message_body); + $dispurl = '/\ssrc\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' . $id . '[\s\'"]\s*/'; + $match = preg_match($dispurl, $message_body, $matches); if ($isHtml && ($match > 0)) { - $message_body = preg_replace($dispurl, ' src="'.$attachment['name'].'"', $message_body); + $message_body = preg_replace($dispurl, ' src="'.$attachment['name'].'" ', $message_body); $MAIL_MIME->setHTMLBody($message_body. ($footer ? "\r\n<pre>".$footer.'</pre>' : '')); $MAIL_MIME->addHTMLImage($attachment['path'], $attachment['mimetype'], $attachment['name']); } |
