MEDIUM: Fix for entities showing in title attribute

This commit is contained in:
Juan Molina 2012-10-03 18:52:43 +02:00
parent 10b72dbc86
commit 0e3bd1adbb
1 changed files with 10 additions and 1 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 Convert::html2raw($this->Title());
}
/**
* Validates the value submitted by the user with the one saved
* into the {@link Session} and then notify callback object