*** maillist.php 2009-05-14 17:39:33.000000000 +0200 --- maillist_pat.php 2009-05-15 09:44:54.000000000 +0200 *************** *** 121,126 **** --- 121,129 ---- case 'text/html': $this->decode_message_body(); + // We need to keep line breaks for textformatting befor using 'strip_tags' + $l_breaks = array("<br />", "</p>", "<p>", "<br>" ); + $this->body = str_replace($l_breaks, "\n", $this->body); $this->body = (!$html ? strip_tags($this->body) : $this->body); break;
Index: maillist.php =================================================================== RCS file: /forum21/install/forum_data/scripts/maillist.php,v retrieving revision 1.78 diff -u -r1.78 maillist.php --- maillist.php 3 May 2009 18:43:45 -0000 1.78 +++ maillist.php 15 May 2009 10:20:02 -0000 @@ -121,7 +121,11 @@ case 'text/html': $this->decode_message_body(); - $this->body = (!$html ? strip_tags($this->body) : $this->body); + if (!$html) { + $this->body = str_ireplace(array('<br />', '<br>'), "\n", $this->body); + $this->body = str_ireplace(array('<p>', '</p>'), "\n\n", $this->body); + $this->body = strip_tags($this->body); + } break; case 'multipart/parallel': // Apparently same as multipart/mixed but order of body parts does not matter
$this->decode_message_body(); $this->body = str_replace("<p>", "\n\n", $this->body); $this->body = str_replace(array("<br />", "</p>", "<br>" ), "\n", $this->body); $this->body = strip_tags($this->body); break;
$this->body = (!$html ? strip_tags($this->body) : $this->body);
+ if (!$html) { + $this->body = str_ireplace(array('<br />', '<br>', '</p>'), "\n", $this->body); + $this->body = str_ireplace('<p>', "\n\n", $this->body); + $this->body = strip_tags($this->body); + } break;