From: Michael M Slusarz Date: Wed, 3 Dec 2008 06:50:27 +0000 (-0700) Subject: Fix from Ticket #7657. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a4eb192ebc32a5afddf3b02921b59ad6dc030bc9;p=horde.git Fix from Ticket #7657. --- diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index d6061f9c7..ee0b46255 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -880,9 +880,10 @@ class Horde_Mime_Part break; case 'text': + $eol = $this->getEOL(); if (Horde_Mime::is8bit($this->_contents)) { $encoding = ($this->_encode7bit) ? 'quoted-printable' : '8bit'; - } elseif (preg_match("/(?:\n|^)[^\n]{999,}(?:\n|$)/", $this->_contents)) { + } elseif (preg_match("/(?:" . $eol . "|^)[^" . $eol . "]{999,}(?:" . $eol . "|$)/", $this->_contents)) { /* If the text is longer than 998 characters between * linebreaks, use quoted-printable encoding to ensure the * text will not be chopped (i.e. by sendmail if being sent