From ced0a208d8fecedcf2051be1cd16717a698d881a Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Jul 2012 16:34:01 -0700 Subject: fix double lines --- include/bbcode.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 1c6ce1d45..410f88c96 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -93,8 +93,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // Convert new line chars to html
tags + // nlbr seems to be hopelessly messed up + // $Text = nl2br($Text); -// $Text = nl2br($Text); + // We'll emulate it. + + $Text = str_replace("\r\n","\n", $Text); $Text = str_replace(array("\r","\n"), array('
','
'), $Text); if($preserve_nl) -- cgit v1.2.3