]> git.mxchange.org Git - friendica.git/blobdiff - include/html2bbcode.php
freeform text area for private contact info - notes or things you just want to rememb...
[friendica.git] / include / html2bbcode.php
index 31ede1a8e693332f72ef0a5063d983ec6f5adb8b..a2e53a81b8682f8e9ebc2693e9d013d3e5b1e804 100644 (file)
@@ -6,6 +6,7 @@ function html2bbcode($s) {
 
 // Tags to Find
 $htmltags = array(
+                                               '/\n/is',
                         '/\<b\>(.*?)\<\/b\>/is',
                         '/\<i\>(.*?)\<\/i\>/is',
                         '/\<u\>(.*?)\<\/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]',