]> git.mxchange.org Git - friendica.git/commitdiff
Add <br> for each carriage return
authorHypolite Petovan <ben.lort@gmail.com>
Tue, 6 Dec 2016 03:46:51 +0000 (22:46 -0500)
committerHypolite Petovan <ben.lort@gmail.com>
Tue, 6 Dec 2016 03:46:51 +0000 (22:46 -0500)
Fixes #2993

include/bb2diaspora.php

index cd5424216487fcf8c9059d4f8d3db9e8ee9a42c5..d6bff9ab5b993a608a004474e11cb754effb4c67 100644 (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);