cvs: pear /Mail_Mime mime.php

From: Date: Sun, 09 Apr 2006 00:37:56 +0000
Subject: cvs: pear /Mail_Mime mime.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39502@lists.php.net to get a copy of this message
cipri Sun Apr 9 00:37:56 2006 UTC Modified files: /pear/Mail_Mime mime.php Log: addHTMLImage now works with CSS - Bug #6568 http://cvs.php.net/viewcvs.cgi/pear/Mail_Mime/mime.php?r1=1.45&r2=1.46&diff_format=u Index: pear/Mail_Mime/mime.php diff -u pear/Mail_Mime/mime.php:1.45 pear/Mail_Mime/mime.php:1.46 --- pear/Mail_Mime/mime.php:1.45 Sat Apr 8 22:40:20 2006 +++ pear/Mail_Mime/mime.php Sun Apr 9 00:37:56 2006 @@ -35,7 +35,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> (port to PEAR) | // +-----------------------------------------------------------------------+ // -// $Id: mime.php,v 1.45 2006/04/08 22:40:20 cipri Exp $ +// $Id: mime.php,v 1.46 2006/04/09 00:37:56 cipri Exp $ require_once('PEAR.php'); require_once('Mail/mimePart.php'); @@ -484,9 +484,14 @@ if (!empty($this->_html_images) AND isset($this->_htmlbody)) { foreach ($this->_html_images as $value) { - $regex = '#(\s)((?i)src|background|href(?-i))\s*=\s*(["\']?)' . preg_quote($value['name'], '#') . - '\3#'; - $rep = '\1\2=\3cid:' . $value['cid'] .'\3'; + $regex = array(); + $regex[] = '#(\s)((?i)src|background|href(?-i))\s*=\s*(["\']?)' . + preg_quote($value['name'], '#') . '\3#'; + $regex[] = '#(?i)url(?-i)\(\s*(["\']?)' . + preg_quote($value['name'], '#') . '\1\s*\)#'; + $rep = array(); + $rep[] = '\1\2=\3cid:' . $value['cid'] .'\3'; + $rep[] = 'url(\1cid:' . $value['cid'] . '\2)'; $this->_htmlbody = preg_replace($regex, $rep, $this->_htmlbody );

« previous php.pear.cvs (#39502) next »