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;
    }
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;
    }
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 ; }
Secure a value, remove all, or allow html tags

@access protected
@static
@param Mixed $value Value to secure
@param Mixed $allowHtmlTags It can be a string with HTML tags to allow (see strip_tags documentation)
@see http://www.php.net/strip_tags
@return Mixed
Secure a value remove all or allow html tags