$bodypart = decodeBody($unencoded_bodypart,
$body_part_entity->header->encoding);
if ($type1 == 'html') {
- $bodypart = str_replace(array(' ','>','<'),array(' ','<','>'),$bodypart);
+ $bodypart = str_replace("\n", ' ', $bodypart);
+ $bodypart = preg_replace(array('/<p>/i','/<br\s*(\/)*>/i'), "\n", $bodypart);
+ $bodypart = str_replace(array(' ','>','<'),array(' ','>','<'),$bodypart);
$bodypart = strip_tags($bodypart);
+
}
if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {