alecpl
2010-05-27 c973abfd8b79e9fe96eb86398dae7ec97db69224
- fix regular expression for images src replacement


1 files modified
2 ■■■ changed files
program/steps/mail/sendmail.inc 2 ●●● patch | view | raw | blame | history
program/steps/mail/sendmail.inc
@@ -463,7 +463,7 @@
    // This hook retrieves the attachment contents from the file storage backend
    $attachment = $RCMAIL->plugins->exec_hook('get_attachment', $attachment);
    $dispurl = '/\ssrc\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' . preg_quote($attachment['id']) . '[\s\'"]\s*/';
    $dispurl = '/\ssrc\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' . preg_quote($attachment['id']) . '[\s\'"]*/';
    $message_body = $MAIL_MIME->getHTMLBody();
    if ($isHtml && (preg_match($dispurl, $message_body) > 0)) {
      $message_body = preg_replace($dispurl, ' src="'.$attachment['name'].'" ', $message_body);