diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-11-09 16:02:03 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-11-09 16:02:03 +0100 |
commit | a16cf3bb7cdae47b4729365593bb0b3a43c5c466 (patch) | |
tree | 2b8bab266e443fb7c5810f878badcd81e91e0332 /program | |
parent | a7a778c157426f12f176648802a51c5e5397a81a (diff) |
Replace all attachment-image URIs with CID URIs, not only src and poster attributes (#1490132)
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/sendmail.inc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index d3cbdf0bd..41bcfa6e9 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -428,8 +428,7 @@ if (is_array($COMPOSE['attachments'])) { $attachment = $RCMAIL->plugins->exec_hook('attachment_get', $attachment); if ($isHtml) { - $dispurl = '/\s(poster|src)\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' - . preg_quote($attachment['id']) . '[\s\'"]*/'; + $dispurl = '/[\'"]\S+display-attachment\S+file=rcmfile' . preg_quote($attachment['id']) . '[\'"]/'; $message_body = $MAIL_MIME->getHTMLBody(); $is_inline = preg_match($dispurl, $message_body); } @@ -449,7 +448,7 @@ if (is_array($COMPOSE['attachments'])) { $cid .= '@localhost'; } - $message_body = preg_replace($dispurl, ' \\1="cid:' . $cid . '" ', $message_body); + $message_body = preg_replace($dispurl, '"cid:' . $cid . '"', $message_body); $MAIL_MIME->setHTMLBody($message_body); |