cvs: php4 /pear/Mail mimeDecode.php

From: Date: Sat, 22 Sep 2001 12:17:12 +0000
Subject: cvs: php4 /pear/Mail mimeDecode.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-868@lists.php.net to get a copy of this message
heyesr Sat Sep 22 08:17:12 2001 EDT Modified files: /php4/pear/Mail mimeDecode.php Log: Changed two tabs in regexs to \t Index: php4/pear/Mail/mimeDecode.php diff -u php4/pear/Mail/mimeDecode.php:1.3 php4/pear/Mail/mimeDecode.php:1.4 --- php4/pear/Mail/mimeDecode.php:1.3 Fri Sep 21 22:42:15 2001 +++ php4/pear/Mail/mimeDecode.php Sat Sep 22 08:17:12 2001 @@ -25,11 +25,6 @@ * | you are STRONGLY recommended to use the php extensions. | * +----------------------------------------------------------------------+ * -* +------------------------------- NOTE ---------------------------------+ -* | If you do a search and replace of tabs for spaces, make sure that the| -* | two tabs in the regular expressions are NOT replaced! | -* +----------------------------------------------------------------------+ -* * Mime Decoding class * * This class will parse a raw mime email and return @@ -54,7 +49,7 @@ * - Implement decoding of bodies (Just need the _decodeBodies method writing) * * @author Richard Heyes <richard.heyes@heyes-computing.net> -* @version $Revision: 1.3 $ +* @version $Revision: 1.4 $ * @package Mail */ @@ -335,7 +330,7 @@ if ($input !== '') { // Unfold the input - $input = preg_replace('/' . $this->_crlf . '( | )/', ' ', $input); // Not two spaces in regex, but a tab and a space + $input = preg_replace('/' . $this->_crlf . "(\t| )/", ' ', $input); $headers = explode($this->_crlf, trim($input)); foreach ($headers as $value) { @@ -416,7 +411,7 @@ function _decodeHeader($input) { // Remove white space between encoded-words - $input = preg_replace('/(=\?[^?]+\?(Q|B)\?[^?]*\?=)( | |' . $this->_crlf . ')+=\?/', '\1=?', $input); + $input = preg_replace('/(=\?[^?]+\?(Q|B)\?[^?]*\?=)( |' . "\t|" . $this->_crlf . ')+=\?/', '\1=?', $input); // For each encoded-word... while(preg_match('/(=\?([^?]+)\?(Q|B)\?([^?]*)\?=)/', $input, $matches)){

« previous php.pear.cvs (#868) next »