summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2010-03-12 12:55:51 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2010-03-12 12:55:51 +0100
commit726c8eb63eac6f64408536dd39b7854dfa000251 (patch)
tree3463ac6667f63d4e7ef300f553c3d7e47e598d81
parent3140ad543e26a0aa4e6bc57a3a85ecdb3dfcf0d5 (diff)
prep_url() will now not append http:// to string if a protocol is already used. That would really mess up itunes://, spotify://, telnet://, etc.
-rw-r--r--system/helpers/url_helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 90ea9207e..86caa278c 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -446,7 +446,7 @@ if ( ! function_exists('prep_url'))
return '';
}
- if (substr($str, 0, 7) != 'http://' && substr($str, 0, 8) != 'https://')
+ if (!preg_match('/^[a-z]{3,6}:\/\//', $str))
{
$str = 'http://'.$str;
}