PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Mime » Bug #2364

_quotedPrintableEncode() does not encode TAB followed by (CR)LF

Details

Submitted2004-09-21 08:51 UTC
Frommp at webfactory dot de
Assignedsean
StatusClosed
PackageMail_Mime
PHP VersionIrrelevant
OSAll
Roadmaps(Not assigned)

Comments

[2004-09-21 08:51 UTC] mp at webfactory dot de

Description:
------------
The implementation of _quotedPrintableEncode() does not TAB characters immediately followed by a newline (hard line break) as required by RFC2045, section 6.7 paragraph (3).

SPACE followed by newlines are treated correctly (specified in the same part of the above RFC).

Reproduce code:
---------------
define('MAIL_MIMEPART_CRLF', "\r\n");
$test = "Here's\t\na tab\n";
require_once('path/to/mimePart.php');
print Mail_mimePart::_quotedPrintableEncode($test, 7);

Expected result:
----------------
Here's=
=09
a tab

Actual result:
--------------
Here's=
<= [there's a TAB char]
a tab