From: Michael Date: Mon, 8 May 2017 12:35:44 +0000 (+0000) Subject: More URL can be styled X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3f975f6751d92b3833fc2b240cf98c2d1aa8c906;p=friendica.git More URL can be styled --- diff --git a/include/bbcode.php b/include/bbcode.php index 8969b35e11..bea9a07f5b 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -173,9 +173,13 @@ function cleancss($input) { function bb_style_url($match) { $url = $match[1]; + if (isset($match[2]) AND ($match[1] != $match[2])) { + return $match[0]; + } + $parts = parse_url($url); if (!isset($parts['scheme'])) { - return $url; + return $match[0]; } $styled_url = $url; @@ -988,6 +992,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa if ($simplehtml == 7) { $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism", 'bb_style_url', $Text); + $Text = preg_replace_callback("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", 'bb_style_url', $Text); } $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '$1', $Text);