Add <br> for each carriage return

Fixes #2993
This commit is contained in:
Hypolite Petovan 2016-12-05 22:46:51 -05:00
parent 166df0180b
commit 60b9203dd5

View File

@ -17,8 +17,8 @@ function diaspora2bb($s) {
$s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');
// Remove CR to avoid problems with following code
$s = str_replace("\r", '', $s);
// Handles single newlines
$s = str_replace("\r", '<br>', $s);
$s = str_replace("\n", " \n", $s);