X-Git-Url: https://git.toastfreeware.priv.at/toast/cookiecaptcha.git/blobdiff_plain/c9f3c8728091f9768a142073500aeaab496c77f9..0ec7537c29deda6db4bfbc2703f7d2b52cccbbf1:/ReCaptcha.php?ds=sidebyside diff --git a/ReCaptcha.php b/ReCaptcha.php index b7c3d27..a875527 100644 --- a/ReCaptcha.php +++ b/ReCaptcha.php @@ -74,10 +74,9 @@ class ReCaptcha extends SimpleCaptcha { function getForm() { global $wgReCaptchaPublicKey, $wgReCaptchaTheme; $useHttps = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ); - $escapedTheme = Xml::escapeJsString( $wgReCaptchaTheme ); + $js = 'var RecaptchaOptions = ' . Xml::encodeJsVar( array( 'theme' => $wgReCaptchaTheme, 'tabindex' => 1 ) ); - return " " . - recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps); + return Html::inlineScript( $js ) . recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps); } /**