From 42d66874bed88753cbcf08a060c89f789f41a3ae Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 1 Dec 2010 21:13:09 -0800 Subject: improved linkification of naked text urls --- include/bbcode.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 52ca86bc1..fbae7bc32 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -18,8 +18,7 @@ function bbcode($Text) { // Perform URL Search - $Text = preg_replace("/[^\]\=](http\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' $1', $Text); - $Text = preg_replace("/[^\]\=](https\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' $1', $Text); + $Text = preg_replace("/[^\]\=](https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' $1', $Text); $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '$1', $Text); $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '$2', $Text); -- cgit v1.2.3