Index: trunk/extensions/ConfirmEdit/Captcha.php |
— | — | @@ -10,7 +10,9 @@ |
11 | 11 | since the api uses text/plain, not text/html */ |
12 | 12 | $op = mt_rand( 0, 1 ) ? '+' : '−'; |
13 | 13 | |
14 | | - $test = "$a $op $b"; |
| 14 | + // No space before and after $op, to ensure correct |
| 15 | + // directionality. |
| 16 | + $test = "$a$op$b"; |
15 | 17 | $answer = ( $op == '+' ) ? ( $a + $b ) : ( $a - $b ); |
16 | 18 | return array( 'question' => $test, 'answer' => $answer ); |
17 | 19 | } |
— | — | @@ -37,9 +39,7 @@ |
38 | 40 | $captcha = $this->getCaptcha(); |
39 | 41 | $index = $this->storeCaptcha( $captcha ); |
40 | 42 | |
41 | | - // dir="ltr" is needed because otherwise it may say |
42 | | - // "5 - 20" instead of "20 - 5" and that would be wrong. |
43 | | - return "<p><label dir=\"ltr\" for=\"wpCaptchaWord\">{$captcha['question']}</label> = " . |
| 43 | + return "<p><label for=\"wpCaptchaWord\">{$captcha['question']}</label> = " . |
44 | 44 | Xml::element( 'input', array( |
45 | 45 | 'name' => 'wpCaptchaWord', |
46 | 46 | 'id' => 'wpCaptchaWord', |