From 74f3307f26368350169a1faf05f238b2876cb3c6 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sat, 7 Aug 2021 07:48:08 +0000 Subject: [PATCH] (hopefully) improve bbcode links in messages --- Rocksolid_Light/rocksolid/newsportal.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index 95730d4..e973715 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -885,6 +885,9 @@ function html_parse($text) { if(preg_match('/(https?|ftp|news|gopher|telnet)\:\/\/[^\",]+/i', $word)) { $nlink = trim($word, '().,'); $nlink = preg_replace('/(\<|\>|\ );/', '', $nlink); + $nlink = preg_replace('/\[url=/', '', $nlink); + $bbnlink = explode(']', $nlink); + $nlink = $bbnlink[0]; $nword = ''.$word.''; if($nword!=$word && substr($nlink, strlen($nlink) - 3) != "://") { $word=$nword;