summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/helpers/url_helper.php2
-rw-r--r--system/libraries/Form_validation.php7
-rw-r--r--system/libraries/Javascript.php4
3 files changed, 4 insertions, 9 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index fd7b5e116..8a5a75c44 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -443,7 +443,7 @@ if ( ! function_exists('prep_url'))
*/
function prep_url($str = '')
{
- if ($str === 'http://' OR $str === '')
+ if ($str === '')
{
return '';
}
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 61f0298fd..86a569ced 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1523,12 +1523,7 @@ class CI_Form_validation {
*/
public function prep_url($str = '')
{
- if ($str === 'http://' OR $str === '')
- {
- return '';
- }
-
- if (strpos($str, 'http://') !== 0 && strpos($str, 'https://') !== 0)
+ if ($str !== '' && stripos($str, 'http://') !== 0 && stripos($str, 'https://') !== 0)
{
return 'http://'.$str;
}
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index dcf933779..2ddab38ee 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -650,11 +650,11 @@ class CI_Javascript {
$this->_javascript_location = $this->CI->config->item('javascript_location');
}
- if ($relative === TRUE OR strpos($external_file, 'http://') === 0 OR strpos($external_file, 'https://') === 0)
+ if ($relative === TRUE OR stripos($external_file, 'http://') === 0 OR stripos($external_file, 'https://') === 0)
{
$str = $this->_open_script($external_file);
}
- elseif (strpos($this->_javascript_location, 'http://') !== FALSE)
+ elseif (stripos($this->_javascript_location, 'http://') !== FALSE)
{
$str = $this->_open_script($this->_javascript_location.$external_file);
}