From 16763da87f0d8c7b5cb464bebcbe4444268ece89 Mon Sep 17 00:00:00 2001 From: the_systech Date: Mon, 18 Mar 2002 17:21:28 +0000 Subject: [PATCH] Fix for bug #529642... Tabs should end parsing for magic urls as well as spaces or newlines... git-svn-id: file:///svn/phpbb/trunk@2317 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/bbcode.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 6ae35cb036..32a8131040 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -600,7 +600,7 @@ function make_clickable($text) // matches an "xxxx://yyyy" URL at the start of a line, or after a space. // xxxx can only be alpha characters. // yyyy is anything up to the first space, newline, or comma. - $ret = preg_replace("#([\n ])([a-z]+?)://([^, \n\r]+)#i", "\\1\\2://\\3", $ret); + $ret = preg_replace("#([\n ])([a-z]+?)://([^,\t \n\r]+)#i", "\\1\\2://\\3", $ret); // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing // Must contain at least 2 dots. xxxx contains either alphanum, or "-" @@ -608,7 +608,7 @@ function make_clickable($text) // zzzz is optional.. will contain everything up to the first space, newline, or comma. // This is slightly restrictive - it's not going to match stuff like "forums.foo.com" // This is to keep it from getting annoying and matching stuff that's not meant to be a link. - $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^, \n\r]*)?)#i", "\\1www.\\2.\\3\\4", $ret); + $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,\t \n\r]*)?)#i", "\\1www.\\2.\\3\\4", $ret); // matches an email@domain type address at the start of a line, or after a space. // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". @@ -782,4 +782,4 @@ function phpbb_preg_quote($str, $delimiter) return $text; } -?> \ No newline at end of file +?>