From d265871dfe205a905cd6c39e8ac4371f13848e58 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 22 Mar 2010 11:05:01 -0500 Subject: expanded philsturgeon's bugfix to parse_url() and updated docs and changelog --- system/helpers/url_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/url_helper.php') 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; } -- cgit v1.2.3-24-g4f1b