Merge pull request #4758 from butane/uri_scheme_case
URI schemes are not case-sensitive
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 25dc0d4..61f0298 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1200,7 +1200,7 @@
{
return FALSE;
}
- elseif ( ! in_array($matches[1], array('http', 'https'), TRUE))
+ elseif ( ! in_array(strtolower($matches[1]), array('http', 'https'), TRUE))
{
return FALSE;
}
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index a9b2564..7222c00 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -370,7 +370,7 @@
{
$url = trim($url);
- if (strpos($url, 'http') !== 0)
+ if (stripos($url, 'http') !== 0)
{
$url = 'http://'.$url;
}
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index f965858..181a104 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -352,7 +352,7 @@
*/
public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080)
{
- if (strpos($url, 'http') !== 0)
+ if (stripos($url, 'http') !== 0)
{
$url = 'http://'.$url;
}