summaryrefslogtreecommitdiffstats
path: root/system/helpers/url_helper.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2010-03-22 17:05:01 +0100
committerDerek Jones <derek.jones@ellislab.com>2010-03-22 17:05:01 +0100
commitd265871dfe205a905cd6c39e8ac4371f13848e58 (patch)
treea4aade0cd0f3290815ebbcfde64122ef5d2a6c81 /system/helpers/url_helper.php
parent726c8eb63eac6f64408536dd39b7854dfa000251 (diff)
expanded philsturgeon's bugfix to parse_url() and updated docs and changelog
Diffstat (limited to 'system/helpers/url_helper.php')
-rw-r--r--system/helpers/url_helper.php4
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;
}