summaryrefslogtreecommitdiffstats
path: root/system/libraries/Input.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Input.php')
-rw-r--r--system/libraries/Input.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/system/libraries/Input.php b/system/libraries/Input.php
index b0a39c59f..50b4d823d 100644
--- a/system/libraries/Input.php
+++ b/system/libraries/Input.php
@@ -521,8 +521,7 @@ class CI_Input {
* between ascii characters, like Java\0script.
*
*/
- $str = preg_replace('/\0+/', '', $str);
- $str = preg_replace('/(\\\\0)+/', '', $str);
+ $str = preg_replace(array('/\0+/', '/(\\\\0)+/'), '', $str);
/*
* Protect GET variables in URLs
@@ -646,7 +645,9 @@ class CI_Input {
foreach ($words as $word)
{
$temp = '';
- for ($i = 0; $i < strlen($word); $i++)
+ $wordlen = strlen($word);
+
+ for ($i = 0; $i < $wordlen; $i++)
{
$temp .= substr($word, $i, 1)."\s*";
}