From a4eb192ebc32a5afddf3b02921b59ad6dc030bc9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 2 Dec 2008 23:50:27 -0700 Subject: [PATCH] Fix from Ticket #7657. --- framework/Mime/lib/Horde/Mime/Part.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.11.0