Remove \n\r", "\n", "\r" to <br >

Text should be formatted using <br /> or <p> </p>
1.10.x
Julio Montoya 9 years ago
parent 4ff3d68e7a
commit 2b9f826f50
  1. 2
      main/inc/lib/api.lib.php
  2. 2
      main/inc/lib/message.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);

@ -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)) {

Loading…
Cancel
Save