Index: trunk/extensions/ConfirmEdit/ReCaptcha.php |
— | — | @@ -74,10 +74,9 @@ |
75 | 75 | function getForm() { |
76 | 76 | global $wgReCaptchaPublicKey, $wgReCaptchaTheme; |
77 | 77 | $useHttps = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ); |
78 | | - $escapedTheme = Xml::escapeJsString( $wgReCaptchaTheme ); |
| 78 | + $js = 'var RecaptchaOptions = ' . Xml::encodeJsVar( array( 'theme' => $wgReCaptchaTheme, 'tabindex' => 1 ) ); |
79 | 79 | |
80 | | - return "<script>var RecaptchaOptions = { theme : '$escapedTheme', tabindex : 1 }; </script> " . |
81 | | - recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps); |
| 80 | + return Html::inlineScript( $js ) . recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps); |
82 | 81 | } |
83 | 82 | |
84 | 83 | /** |