Fix from Ticket #7657.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 3 Dec 2008 06:50:27 +0000 (23:50 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 3 Dec 2008 06:50:27 +0000 (23:50 -0700)
framework/Mime/lib/Horde/Mime/Part.php

index d6061f9..ee0b462 100644 (file)
@@ -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