FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Maillist.php patch for pure html mails
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Maillist.php patch for pure html mails [message #159246] Fri, 15 May 2009 08:26 Go to previous message
Peter Vendike is currently offline  Peter Vendike   Denmark
Messages: 65
Registered: February 2009
Location: Denmark
Karma:
Member
Translator
In (rare) cases where the imported mail has no 'text/plain' alternative and is pure html, the body-text showed up as one long line, barely readable (of cause only if 'Allow HTML in Mailing List Messages' is off).

This small patch saves the line breaks and the text formatting is kept for the imported message.




*** 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;
  

[Updated on: Fri, 15 May 2009 08:55]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Message Navigator: No logical search function
Next Topic: avatar upload
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 19:59:27 GMT 2024

Total time taken to generate the page: 0.04080 seconds