Browse Source

Remove \n\r", "\n", "\r" to <br >
Text should be formatted using <br /> or <p> </p>

Julio Montoya 9 years ago
parent
commit
2b9f826f50
2 changed files with 2 additions and 2 deletions
  1. 1 1
      main/inc/lib/api.lib.php
  2. 1 1
      main/inc/lib/message.lib.php

+ 1 - 1
main/inc/lib/api.lib.php

@@ -7962,7 +7962,7 @@ function api_mail_html(
             }
         }
     }
-    $message = str_replace(array("\n\r", "\n", "\r"), '<br />', $message);
+    //$message = str_replace(array("\n\r", "\n", "\r"), '<br />', $message);
 
     $mailView = new Template(null, false, false, false, false, false, false);
     $mailView->assign('content', $message);

+ 1 - 1
main/inc/lib/message.lib.php

@@ -252,7 +252,7 @@ class MessageManager
         $inbox_last_id = null;
 
         //Just in case we replace the and \n and \n\r while saving in the DB
-        $content = str_replace(array("\n", "\n\r"), '<br />', $content);
+        //$content = str_replace(array("\n", "\n\r"), '<br />', $content);
 
         $now = api_get_utc_datetime();
         if (!empty($receiver_user_id) || !empty($group_id)) {