X-Git-Url: https://git.toastfreeware.priv.at/toast/cookiecaptcha.git/blobdiff_plain/2df8abcefffc6cbf5c2f7e38aec90eb581d5967d..d7d288c457f1973a514c79ba838e324343c448e6:/MathCaptcha.class.php diff --git a/MathCaptcha.class.php b/MathCaptcha.class.php index 66567e0..9348d87 100644 --- a/MathCaptcha.class.php +++ b/MathCaptcha.class.php @@ -22,8 +22,8 @@ class MathCaptcha extends SimpleCaptcha { $index = $this->storeCaptcha( array( 'answer' => $answer ) ); $form = ''; - $form .= '
' . $this->fetchMath( $sum ) . '' . wfInput( 'wpCaptchaAnswer', false, false, array( 'tabindex' => '1' ) ) . '
'; - $form .= wfHidden( 'wpCaptchaId', $index ); + $form .= '' . Xml::input( 'wpCaptchaWord', false, false, array( 'tabindex' => '1' ) ) . ''; + $form .= Xml::hidden( 'wpCaptchaId', $index ); return $form; } @@ -42,7 +42,7 @@ class MathCaptcha extends SimpleCaptcha { $math = new MathRenderer( $sum ); $math->setOutputMode( MW_MATH_PNG ); $html = $math->render(); - return preg_replace( '/alt=".*"/', '', $html ); + return preg_replace( '/alt=".*?"/', '', $html ); } }