protected function _confirm($message, $okCode, $cancelCode = '', $options = [])
    {
        $message = $this->_cleanConfirmMessage($message);
        $confirm = "if (confirm({$message})) { {$okCode} } {$cancelCode}";
        // We cannot change the key here in 3.x, but the behavior is inverted in this case
        $escape = isset($options['escape']) && $options['escape'] === false;
        if ($escape) {
            /** @var string $confirm */
            $confirm = h($confirm);
        }

        return $confirm;
    }