protected static function _secure($value, $allowHtmlTags) {
        if (is_array($value)) {
            foreach ($value as &$v)
                $v = self::_secure($v, $allowHtmlTags);
        } elseif (is_string($value))
            $value = htmlspecialchars(strip_tags($value, ((is_string($allowHtmlTags) && !empty($allowHtmlTags)) ? $allowHtmlTags : null)), ENT_QUOTES);
        return $value;
    }