diff options
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/url_helper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 86caa278c..7707d6854 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -431,7 +431,7 @@ if ( ! function_exists('auto_link')) /** * Prep URL * - * Simply adds the http:// part if missing + * Simply adds the http:// part if no scheme is included * * @access public * @param string the URL @@ -446,7 +446,7 @@ if ( ! function_exists('prep_url')) return ''; } - if (!preg_match('/^[a-z]{3,6}:\/\//', $str)) + if ( ! parse_url($str, PHP_URL_SCHEME)) { $str = 'http://'.$str; } |