handle the headerlines like it should (rfc2060). For example a subject line
with a subject size of 70 chars (no spaces) could not be detected.
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4551
7612ce4b-ef26-0410-bec9-
ea0150e637f0
foreach ($read as $read_part) {
//unfold multi-line headers
- if ($prevline && strpos($read_part, "\t ") === true) {
+ if ($prevline && $prevline{strlen($prevline)-1} == "\n"
+ && ($read_part{0} == ' ' || $read_part{0} == "\t")) {
$read_part = substr($prevline, 0, -2) . preg_replace('/(\t\s+)/',' ',$read_part);
}
$prevline = $read_part;