1 -------- Original Message --------
2 Subject: bk commit - eventum-internal (bryan:1.1521)
3 Date: Tue, 13 Sep 2005 03:57:17 +0200
6 Remove 'double decoding' of emails.
8 --- 1.49/include/class.mime_helper.php 2005-08-09 18:11:27 +02:00
9 +++ 1.50/include/class.mime_helper.php 2005-09-13 03:56:49 +02:00
11 $str = str_replace("</DIV><DIV>", "\n", $str);
12 $str = str_replace(array("<br>", "<br />", "<BR>", "<BR />"), "\n", $str);
14 - if (@$output->headers['content-transfer-encoding'] == 'quoted-printable') {
15 - $str = Mime_Helper::decodeBody($str, 'quoted-printable');
17 // XXX: do we also need to do something here about base64 encoding?
19 $str = strip_tags($str);
24 - * Method used to decode the body of a MIME encoded message.
27 - * @param string $input The full body of the message
28 - * @param string $encoding The encoding used in the message
29 - * @return string The decoded message body
31 - function decodeBody($input, $encoding = '7bit')
33 - switch ($encoding) {
38 - case 'quoted-printable':
39 - return Mime_Helper::_quotedPrintableDecode($input);
43 - return base64_decode($input);
53 * Given a quoted-printable string, this
54 * function will decode and return it.