From 85f42ad26d50ebb5847784cdda0256b40da59dd0 Mon Sep 17 00:00:00 2001 From: Michael Vogel <icarus@dabo.de> Date: Wed, 1 Jun 2016 16:19:53 +0200 Subject: [PATCH] Tags are now supported as well --- include/bbcode.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index 3833c55401..39f04aa692 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -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); -- 2.39.5