From 206eee02294cc75c06479f599c03e5a95ea5ee70 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 5 Nov 2010 02:19:39 -0700 Subject: preserve newlines on all networks --- include/html2bbcode.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/html2bbcode.php') diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 31ede1a8e..a2e53a81b 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -6,6 +6,7 @@ function html2bbcode($s) { // Tags to Find $htmltags = array( + '/\n/is', '/\(.*?)\<\/b\>/is', '/\(.*?)\<\/i\>/is', '/\(.*?)\<\/u\>/is', @@ -24,6 +25,7 @@ $htmltags = array( // Replace with $bbtags = array( + '', '[b]$1[/b]', '[i]$1[/i]', '[u]$1[/u]', @@ -31,7 +33,7 @@ $bbtags = array( '[*]$1', '[img]$2[/img]', '$2', - '\n', + "\n", '[b]$1[/b]', '[url=$1]$3[/url]', '[code]$1[/code]', -- cgit v1.2.3