BUGFIX: fixed #4119 by using htmlentities rather then Convert functions

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@77737 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2009-05-25 04:38:29 +00:00 committed by Sam Minnee
parent e72e9a6d88
commit 060f1bcee6

View File

@ -47,7 +47,7 @@ class TextareaField extends FormField {
return $this->createTag(
'span',
$attributes,
($this->value ? $this->value : '<i>(' . _t('FormField.NONE', 'none') . ')</i>')
(($this->value) ? htmlentities($this->value) : '<i>(' . _t('FormField.NONE', 'none') . ')</i>')
);
} else {
$attributes = array(
@ -60,7 +60,7 @@ class TextareaField extends FormField {
if($this->disabled) $attributes['disabled'] = 'disabled';
return $this->createTag('textarea', $attributes, $this->value);
return $this->createTag('textarea', $attributes, htmlentities($this->value));
}
}