public function escape(string $target = EscapeTarget::HTML)
    {
        switch ($target) {
            case EscapeTarget::ATTRIBUTE:
                return $this->escapeAttribute();
            case EscapeTarget::JS:
                return $this->escapeJS();
            case EscapeTarget::HTML:
            default:
                return $this->escapeHTML();
        }
    }