]> git.mxchange.org Git - friendica.git/blobdiff - include/bb2diaspora.php
Let an item be accssible via the GUI (additionally to uid and item id)
[friendica.git] / include / bb2diaspora.php
index 0ffbf0a14464fd8d4dc2bf9f2ab63953c4147bcf..b70a056619f9b8f927fc53032982e11dd859bf7f 100644 (file)
@@ -63,7 +63,8 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
        /**
         * Transform #tags, strip off the [url] and replace spaces with underscore
         */
-       $Text = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', create_function('$match',
+       $URLSearchString = "^\[\]";
+       $Text = preg_replace_callback("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/i", create_function('$match',
                'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
        ), $Text);
 
@@ -77,7 +78,7 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
        else {
                $Text = bbcode($Text, $preserve_nl, false, 4);
                // Libertree doesn't convert a harizontal rule if there isn't a linefeed
-               $Text = str_replace("<hr />", "\n<hr />", $Text);
+               $Text = str_replace("<hr />", "<br /><hr />", $Text);
        }
 
        // Now convert HTML to Markdown