diff --git a/model/fieldtypes/StringField.php b/model/fieldtypes/StringField.php index 6bc92a73b..1089becab 100644 --- a/model/fieldtypes/StringField.php +++ b/model/fieldtypes/StringField.php @@ -21,6 +21,7 @@ abstract class StringField extends DBField { 'LimitWordCountXML' => 'HTMLText', "LowerCase" => "Text", "UpperCase" => "Text", + 'NoHTML' => 'Text', ); /** @@ -187,4 +188,13 @@ abstract class StringField extends DBField { public function UpperCase() { return mb_strtoupper($this->value); } + + /** + * Return the value of the field stripped of html tags. + * + * @return string + */ + public function NoHTML() { + return strip_tags($this->value); + } } diff --git a/model/fieldtypes/Text.php b/model/fieldtypes/Text.php index 7c3a99ee6..4706408b7 100644 --- a/model/fieldtypes/Text.php +++ b/model/fieldtypes/Text.php @@ -30,7 +30,6 @@ class Text extends StringField { 'EscapeXML' => 'Text', 'LimitWordCount' => 'Text', 'LimitWordCountXML' => 'HTMLText', - 'NoHTML' => 'Text', ); /** @@ -52,15 +51,6 @@ class Text extends StringField { DB::requireField($this->tableName, $this->name, $values, $this->default); } - - /** - * Return the value of the field stripped of html tags. - * - * @return string - */ - public function NoHTML() { - return strip_tags($this->value); - } /** * Return the value of the field with relative links converted to absolute urls.