From 8d9b522bdbb6f7664f42051037ff52fe1bc8a168 Mon Sep 17 00:00:00 2001 From: f0o Date: Wed, 10 Feb 2016 13:54:22 +0000 Subject: [PATCH] Remove redundant calls --- html/includes/vars.inc.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/html/includes/vars.inc.php b/html/includes/vars.inc.php index a633cef721..c9008d2178 100644 --- a/html/includes/vars.inc.php +++ b/html/includes/vars.inc.php @@ -7,7 +7,7 @@ foreach ($_GET as $key => $get_var) { $value = 'yes'; } - $vars[$name] = htmlentities($value); + $vars[$name] = $value; } } @@ -23,7 +23,7 @@ else { foreach ($segments as $pos => $segment) { $segment = urldecode($segment); if ($pos == '0') { - $vars['page'] = htmlentities($segment); + $vars['page'] = $segment; } else { list($name, $value) = explode('=', $segment); @@ -31,15 +31,17 @@ foreach ($segments as $pos => $segment) { $vars[$name] = yes; } else { - $vars[$name] = htmlentities($value); + $vars[$name] = $value; } } } foreach ($_GET as $name => $value) { - $vars[$name] = htmlentities($value); + $vars[$name] = $value; } foreach ($_POST as $name => $value) { - $vars[$name] = htmlentities($value); + $vars[$name] = $value; } + +array_walk_recursive($vars,'sanitize_array');