src/Core/Template.php
protected function escape($value)
    {
        if (empty($value) || is_numeric($value) || is_bool($value)) {
            return $value;
        }

        if (is_array($value) || is_object($value)) {
            foreach ($value as $value_key => $value_item) {
                $value[$value_key] = $this->escape($value_item);
            }
            return $value;
        }
        return htmlspecialchars((string)$value, ENT_NOQUOTES | ENT_SUBSTITUTE, 'UTF-8');
    }
protected function escape($value)
    {
        if (empty($value) || is_numeric($value) || is_bool($value)) {
            return $value;
        }

        if (is_array($value) || is_object($value)) {
            foreach ($value as $value_key => $value_item) {
                $value[$value_key] = $this->escape($value_item);
            }
            return $value;
        }
        return htmlspecialchars((string)$value, ENT_NOQUOTES | ENT_SUBSTITUTE, 'UTF-8');
    }
@param mixed $value

@return mixed