Modified: branches/1.6/felamimail/inc/class.bofelamimail.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/felamimail/inc/class.bofelamimail.inc.php?rev=28283&r1=28282&r2=28283&view=diff ==============================================================================
--- branches/1.6/felamimail/inc/class.bofelamimail.inc.php (original)
+++ branches/1.6/felamimail/inc/class.bofelamimail.inc.php Tue Nov 10 11:27:58 2009
@@ -376,8 +376,8 @@
switch ($_encoding)
{
case 'BASE64':
- // use imap_base64 to decode
- return imap_base64($_mimeMessage);
+ // use imap_base64 to decode, not any longer, as it is strict, and fails if it encounters invalid chars
+ return base64_decode($_mimeMessage); //imap_base64($_mimeMessage);
break;
case 'QUOTED-PRINTABLE':
// use imap_qprint to decode
$newBody = @htmlentities($singleBodyPart['body'],ENT_QUOTES, strtoupper($this->displayCharset));
+ // if empty and charset is utf8 try sanitizing the string in question
+ if (empty($newBody) && strtolower($singleBodyPart['charSet'])=='utf-8') $newBody = @htmlentities(iconv('utf-8', 'utf-8', $singleBodyPart['body']),ENT_QUOTES, strtoupper($this->displayCharset));
// if the conversion to htmlentities fails somehow, try without specifying the charset, which defaults to iso-
if (empty($newBody)) $newBody = htmlentities($singleBodyPart['body'],ENT_QUOTES);
#$newBody = $this->bofelamimail->wordwrap($newBody, 90, "\n");
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________
eGroupWare-cvs mailing list
eGroupWare-cvs@... https://lists.sourceforge.net/lists/listinfo/egroupware-cvs