]> git.mxchange.org Git - friendica.git/commitdiff
Tags are now supported as well
authorMichael Vogel <icarus@dabo.de>
Wed, 1 Jun 2016 14:19:53 +0000 (16:19 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 1 Jun 2016 14:19:53 +0000 (16:19 +0200)
include/bbcode.php

index 3833c554015ae83dc55acbbba0e2058ca544c015..39f04aa692e8de536f9b9744fdaf3f105787c305 100644 (file)
@@ -854,6 +854,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        if ($tryoembed)
                $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism",'tryoembed',$Text);
 
+       $Text = preg_replace("/([#])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                               '$1<a href="$2" class="tag" title="$3">$3</a>', $Text);
+
        $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$1</a>', $Text);
        $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
        //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);