diff --git a/include/bbcode.php b/include/bbcode.php index f39ebd5b92..c55ebab00c 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -15,14 +15,14 @@ function bbcode($Text) { $Text = nl2br($Text); // Set up the parameters for a URL search string - $URLSearchString = " a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%"; + $URLSearchString = "^\[\]"; // Set up the parameters for a MAIL search string - $MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@"; + $MAILSearchString = $URLSearchString; // Perform URL Search - $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]+)/", ' $2', $Text); + $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%\$\!]+)/", ' $2', $Text); $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '$1', $Text); $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '$2', $Text);