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
Re: Maillist.php patch for pure html mails [message #159247 is a reply to message #159246] Fri, 15 May 2009 10:21 Go to previous messageGo to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma:
Senior Member
Administrator
Core Developer
Will this also work:

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
[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: Fri Nov 29 14:42:25 GMT 2024

Total time taken to generate the page: 0.04123 seconds