MINOR Casting return values in HTMLText correctly (followup on security fixes applied to Text, Varchar, StringField)

This commit is contained in:
Ingo Schommer 2012-01-31 16:22:22 +01:00
parent 6ecf7ffe84
commit 8e3ce755cf

View File

@ -14,6 +14,25 @@ class HTMLText extends Text {
public static $escape_type = 'xml'; public static $escape_type = 'xml';
static $casting = array(
"AbsoluteLinks" => "HTMLText",
"BigSummary" => "HTMLText",
"ContextSummary" => "HTMLText",
"FirstParagraph" => "HTMLText",
"FirstSentence" => "HTMLText",
"LimitCharacters" => "HTMLText",
"LimitSentences" => "HTMLText",
"Lower" => "HTMLText",
"LowerCase" => "HTMLText",
"Summary" => "HTMLText",
"Upper" => "HTMLText",
"UpperCase" => "HTMLText",
'EscapeXML' => 'HTMLText',
'LimitWordCount' => 'HTMLText',
'LimitWordCountXML' => 'HTMLText',
'NoHTML' => 'Text',
);
/** /**
* Create a summary of the content. This will be some section of the first paragraph, limited by * Create a summary of the content. This will be some section of the first paragraph, limited by
* $maxWords. All internal tags are stripped out - the return value is a string * $maxWords. All internal tags are stripped out - the return value is a string