From 4de1198ccf88d4a448ff752f35630228b60c53a8 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Mon, 21 Jan 2013 16:47:22 -0600 Subject: Adjust regex. --- system/helpers/url_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index e54969b22..a6536cf81 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -384,7 +384,7 @@ if ( ! function_exists('auto_link')) function auto_link($str, $type = 'both', $popup = FALSE) { // Find and replace any URLs. - if ($type !== 'email' && preg_match_all('#\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#', $str, $matches, PREG_OFFSET_CAPTURE)) + if ($type !== 'email' && preg_match_all('#\b(([\w-]+://?|www\.)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#', $str, $matches, PREG_OFFSET_CAPTURE)) { // Set our target HTML if using popup links. $target = ($popup) ? 'target="_blank"' : ''; -- cgit v1.2.3-24-g4f1b