ToastFreeware
/
toast
/
cookiecaptcha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22a7055
)
Followup 100813, use Xml::encodeJsVar and Html::inlineScript
author
John Du Hart
<johnduhart@users.mediawiki.org>
Thu, 27 Oct 2011 11:34:34 +0000
(11:34 +0000)
committer
John Du Hart
<johnduhart@users.mediawiki.org>
Thu, 27 Oct 2011 11:34:34 +0000
(11:34 +0000)
ReCaptcha.php
patch
|
blob
|
history
diff --git
a/ReCaptcha.php
b/ReCaptcha.php
index b7c3d27db74e8df7ed7ceb060cfa2299a4df5f14..a8755277fc6178cd7b7c837a9ed5fa566e14255f 100644
(file)
--- 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' );
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);
}
/**
}
/**