private function security_get($value, $decode = false)
{
if (is_array($value)) {
$keys = array_keys($value);
foreach ($keys as $key) {
$value[$key] = $this->security_get($value[$key], $decode);
}
} else {
if (!empty($value) and !is_numeric($value)) {
if ($decode == true) {
$value = urldecode($value);
}
$value = str_replace(array("\t", "\r", "\n", "../"), "", $value);
$value = $this->unhtmlentities($value);
unset($matches);
preg_match_all('/<!\\[cdata\\[(.*?)\\]\\]>/is', $value, $matches);
$value = str_replace($matches[0], $matches[1], $value);
$value = strip_tags($value);
$value = preg_replace('#(' . implode('|', $this->disablecomannds) . ')(\\s*)\\((.*?)\\)#si', "", $value);
$value = str_replace(array("'", '"', '<', '>'), array("'", """, "<", ">"), $value);
$value = trim($value);
}
}
return $value;
}