Changeset 3648 in subversion


Ignore:
Timestamp:
May 20, 2010 11:24:25 PM (3 years ago)
Author:
estadtherr
Message:

Fix double-addition of e-mail domain to content ID in HTML images

Location:
trunk/roundcubemail
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r3644 r3648  
    22=========================== 
    33 
     4- Fix double-addition of e-mail domain to content ID in HTML images 
    45- Read and send messages with format=flowed (#1484370), fixes word wrapping issues (#1486543) 
    56- Fix duplicated attachments when forwarding a message (#1486487) 
  • trunk/roundcubemail/program/lib/Mail/mime.php

    r3484 r3648  
    849849            } 
    850850            foreach ($this->_html_images as $i => $img) { 
    851                 $this->_html_images[$i]['cid'] 
    852                     = $this->_html_images[$i]['cid'] . $domainID; 
     851                $cid = $this->_html_images[$i]['cid']; 
     852                if (!preg_match('#'.preg_quote($domainID).'$#', $cid)) { 
     853                    $this->_html_images[$i]['cid'] = $cid . $domainID; 
     854                } 
    853855            } 
    854856        } 
  • trunk/roundcubemail/program/steps/mail/sendmail.inc

    r3647 r3648  
    9696/** 
    9797 * go from this: 
    98  * <img src=".../tiny_mce/plugins/emotions/images/smiley-cool.gif" border="0" alt="Cool" title="Cool" /> 
     98 * <img src="http[s]://.../tiny_mce/plugins/emotions/images/smiley-cool.gif" border="0" alt="Cool" title="Cool" /> 
    9999 * 
    100100 * to this: 
    101101 * 
    102  * <IMG src="cid:smiley-cool.gif"/> 
     102 * <img src="/path/on/server/.../tiny_mce/plugins/emotions/images/smiley-cool.gif" border="0" alt="Cool" title="Cool" /> 
    103103 * ... 
    104  * ------part... 
    105  * Content-Type: image/gif 
    106  * Content-Transfer-Encoding: base64 
    107  * Content-ID: <smiley-cool.gif> 
    108104 */ 
    109 function rcmail_attach_emoticons(&$mime_message) 
     105function rcmail_fix_emoticon_paths(&$mime_message) 
    110106{ 
    111107  global $CONFIG; 
     
    438434  $MAIL_MIME->setTXTBody($plugin['body']); 
    439435 
    440   // look for "emoticon" images from TinyMCE and copy into message as attachments 
    441   $message_body = rcmail_attach_emoticons($MAIL_MIME); 
     436  // look for "emoticon" images from TinyMCE and change their src paths to 
     437  // be file paths on the server instead of URL paths. 
     438  $message_body = rcmail_fix_emoticon_paths($MAIL_MIME); 
    442439} 
    443440else { 
Note: See TracChangeset for help on using the changeset viewer.