From 5899ae9017c351b9987868871605f3f2324c62c0 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 8 Feb 2011 21:26:28 -0800 Subject: Support bbcode size tag - I may regret this... --- include/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index eb0806dc5..f39ebd5b9 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -49,10 +49,10 @@ function bbcode($Text) { $Text = preg_replace("(\[o\](.+?)\[\/o\])is",'$1',$Text); // Check for colored text - $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","$2",$Text); + $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","$2",$Text); // Check for sized text - $Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","$2",$Text); + $Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","$2",$Text); // Check for list text $Text = preg_replace("/\[list\](.+?)\[\/list\]/is", '' ,$Text); -- cgit v1.2.3 From 971b16ea4aadf8a24427907619e482e4cafe6faa Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 9 Feb 2011 16:55:31 -0800 Subject: Accept pretty much bloody anything inside a [url] tag as a legal URL. --- include/bbcode.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index f39ebd5b9..c55ebab00 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); -- cgit v1.2.3