From: Jonathan A. <jan...@us...> - 2005-02-08 15:39:46
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31515/functions Modified Files: Tag: SM-1_4-STABLE mime.php Log Message: More MS specific issues - Strip <outbind://> tags out. This is a Microsoft only protocol and references files local to the sending machine. This causes issues with Internet Explorer. - Replace <img src="outbind://"> links with clean images to stop issues with Internet Explorer not being able to track down the image. Index: mime.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mime.php,v retrieving revision 1.265.2.41 retrieving revision 1.265.2.42 diff -u -w -r1.265.2.41 -r1.265.2.42 --- mime.php 8 Feb 2005 14:53:56 -0000 1.265.2.41 +++ mime.php 8 Feb 2005 15:39:31 -0000 1.265.2.42 @@ -1403,6 +1403,17 @@ if (preg_match("/^[\'\"]\s*cid:/si", $attvalue)){ $attary{$attname} = sq_cid2http($message, $id, $attvalue, $mailbox); } + + + /** + * "Hack" fix for Outlook using propriatary outbind:// protocol in img tags. + * One day MS might actually make it match something useful, for now, falling + * back to using cid2http, so we can grab the blank.png. + */ + if (preg_match("/^[\'\"]\s*outbind:\/\//si", $attvalue)) { + $attary{$attname} = sq_cid2http($message, $id, $attvalue, $mailbox); + } + } /** * See if we need to append any attributes to this tag. @@ -1501,6 +1512,11 @@ $quotchar = ''; } $cidurl = substr(trim($cidurl), 4); + + $match_str = '/\{.*?\}\//'; + $str_rep = ''; + $cidurl = preg_replace($match_str, $str_rep, $cidurl); + $linkurl = find_ent_id($cidurl, $message); /* in case of non-save cid links $httpurl should be replaced by a sort of unsave link image */ @@ -1796,7 +1812,8 @@ "img", "br", "hr", - "input" + "input", + "outbind" ); $force_tag_closing = true; |