mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Followup 100813, use Xml::encodeJsVar and Html::inlineScript
This commit is contained in:
parent
22a7055adb
commit
e4253ff56d
Notes:
John Du Hart
2011-10-27 11:34:34 +00:00
|
@ -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 "<script>var RecaptchaOptions = { theme : '$escapedTheme', tabindex : 1 }; </script> " .
|
||||
recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps);
|
||||
return Html::inlineScript( $js ) . recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue