diff options
author | Eric Roberts <eric@cryode.com> | 2013-01-21 23:47:22 +0100 |
---|---|---|
committer | Eric Roberts <eric@cryode.com> | 2013-01-21 23:47:22 +0100 |
commit | 4de1198ccf88d4a448ff752f35630228b60c53a8 (patch) | |
tree | 1d4592757798a150d8f44cbdd4b8fe20c9011492 | |
parent | 32a28f59a08c9fd24f0d884ecfa71bf8df4bbe97 (diff) |
Adjust regex.
-rw-r--r-- | system/helpers/url_helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
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"' : ''; |