mirror of
https://github.com/silverstripe/silverstripe-mathspamprotection
synced 2024-10-22 08:05:52 +02:00
MEDIUM: Fix for entities showing in title attribute
This commit is contained in:
parent
10b72dbc86
commit
0e3bd1adbb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user