public function recaptchaHtmlAttr()
    {
        $params = $this->recaptchaParameters();

        $attributes = [];
        foreach ($params as $key => $val) {
            if ($val !== null) {
                $attributes[] = sprintf('data-%s="%s"', $key, htmlspecialchars($val, ENT_QUOTES));
            }
        }

        return implode(' ', $attributes);
    }