summaryrefslogtreecommitdiffstats
path: root/system/core/Security.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-03-26 20:03:38 +0100
committerAndrey Andreev <narf@devilix.net>2015-03-26 20:03:38 +0100
commit068ab206d84bf1668832988932dc61cfb3103bf8 (patch)
tree2dbd83067d61f10f817ecce53253875857f47c5a /system/core/Security.php
parent03404890a5a0ea9c5e02c235a94312741bdf05b2 (diff)
Minor fixes in CI_Security::entity_decode()
Diffstat (limited to 'system/core/Security.php')
-rw-r--r--system/core/Security.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index da497762d..9cef42439 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -656,7 +656,7 @@ class CI_Security {
{
$_entities[':'] = '&colon;';
$_entities['('] = '&lpar;';
- $_entities[')'] = '&rpar';
+ $_entities[')'] = '&rpar;';
$_entities["\n"] = '&newline;';
$_entities["\t"] = '&tab;';
}
@@ -664,11 +664,11 @@ class CI_Security {
$replace = array();
$matches = array_unique(array_map('strtolower', $matches[0]));
- for ($i = 0, $c = count($matches); $i < $c; $i++)
+ foreach ($matches as &$match)
{
- if (($char = array_search($matches[$i].';', $_entities, TRUE)) !== FALSE)
+ if (($char = array_search($match.';', $_entities, TRUE)) !== FALSE)
{
- $replace[$matches[$i]] = $char;
+ $replace[$match] = $char;
}
}