From c1acb410524414fa925c47834d124a3884b68dcb Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 4 Jun 2008 20:58:03 +0000 Subject: a few tweaks for speed --- system/libraries/Input.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'system/libraries/Input.php') 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*"; } -- cgit v1.2.3-24-g4f1b