This commit is contained in:
Juan Molina 2013-07-27 03:19:37 -07:00
commit 34ec5856ec
2 changed files with 12 additions and 3 deletions

View File

@ -26,7 +26,7 @@ class MathSpamProtectorField extends SpamProtectorField {
'id' => $this->id(),
'name' => $this->getName(),
'value' => $this->Value(),
'title' => $this->Title(),
'title' => $this->ATTTitle(),
'tabindex' => $this->getAttribute('tabindex'),
'maxlength' => ($this->maxLength) ? $this->maxLength : null,
'size' => ($this->maxLength) ? min( $this->maxLength, 30 ) : null
@ -44,6 +44,15 @@ class MathSpamProtectorField extends SpamProtectorField {
return sprintf(_t('MathSpamProtectionField.SPAMQUESTION', "Spam protection question: %s"), self::get_math_question());
}
/**
* Returns the spam question for title attribute
*
* @return string
*/
function ATTTitle() {
return html_entity_decode($this->Title(), ENT_COMPAT , 'UTF-8');
}
/**
* Validates the value submitted by the user with the one saved
* into the {@link Session} and then notify callback object

View File

@ -18,8 +18,8 @@ fr:
THREE: trois
TWELVE: douze
TWO: deux
WHATIS: 'Combien font %s plus %s&nbsp?'
WHATIS: 'Combien font %s plus %s ?'
ZERO: zéro
MathSpamProtectionField:
INCORRECTSOLUTION: 'Mauvaise réponse, essayez à nouveau.'
INCORRECTSOLUTION: 'Mauvaise réponse !'
SPAMQUESTION: 'Question anti-spam : %s'