Changeset 2106 in subversion


Ignore:
Timestamp:
Dec 1, 2008 3:15:50 PM (4 years ago)
Author:
thomasb
Message:

Insert meta content-type at top of the html head + add both content-id and content-location of related parts to replacement table

Location:
trunk/roundcubemail/program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_message.php

    r2057 r2106  
    374374          if ($message_ctype_secondary == 'appledouble' && $secondary_type == 'applefile') 
    375375            continue; 
    376  
     376             
     377          if ($message_ctype_secondary == 'related' && $mail_part->headers['content-id']) 
     378            $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']); 
     379          if ($message_ctype_secondary == 'related' && $mail_part->headers['content-location']) 
     380            $mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location']; 
     381             
    377382          // part belongs to a related message 
    378           if ($message_ctype_secondary == 'related' && $mail_part->headers['content-id']) { 
    379             $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']); 
    380             $this->inline_parts[] = $mail_part; 
    381           } 
    382           else if ($message_ctype_secondary == 'related' && $mail_part->headers['content-location']) { 
    383             $mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location']; 
     383          if ($mail_part->content_id || $mail_part->content_location) { 
    384384            $this->inline_parts[] = $mail_part; 
    385385          } 
  • trunk/roundcubemail/program/steps/mail/func.inc

    r2088 r2106  
    650650      if (!preg_match('/<head[^>]*>(.*)<\/head>/Uims', $html)) 
    651651        $html = '<head></head>'. $html; 
    652       $html = substr_replace($html, '<meta http-equiv="Content-Type" content="text/html; charset='.RCMAIL_CHARSET.'" />', intval(stripos($html, '</head>')), 0); 
     652      $html = substr_replace($html, '<meta http-equiv="content-type" content="text/html; charset='.RCMAIL_CHARSET.'" />', intval(stripos($html, '<head>')+6), 0); 
    653653    } 
    654654 
Note: See TracChangeset for help on using the changeset viewer.