]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
Merge branch 'master' of https://github.com/omigeot/friendika into omigeot-master
[friendica.git] / include / bbcode.php
index ef31f5a6651c78975078b4efa6f1b7afc424d6e6..81b581cdbdde51672cf6277182afc1c1f2b1b196 100644 (file)
@@ -21,7 +21,8 @@ function bbcode($Text) {
 
        // Perform URL Search
 
-       $Text = preg_replace("/[^\]\=](https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $Text);
+
+       $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$2" >$2</a>', $Text);
 
        $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" >$1</a>', $Text);
        $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" >$2</a>', $Text);