format.htmlspecialchars¶
Applies PHP htmlspecialchars()
escaping to a value.
See http://www.php.net/manual/function.htmlspecialchars.php
Examples¶
Default notation¶
<f:format.htmlspecialchars>{text}</f:format.htmlspecialchars>
Output:
Text with & " ' < > * replaced by HTML entities (htmlspecialchars applied).
Inline notation¶
{text -> f:format.htmlspecialchars(encoding: 'ISO-8859-1')}
Output:
Text with & " ' < > * replaced by HTML entities (htmlspecialchars applied).
Arguments¶
value¶
- DataType
string
- Required
false
- Description
Value to format
keepQuotes¶
- DataType
boolean
- Required
false
- Description
If TRUE quotes will not be replaced (ENT_NOQUOTES)
encoding¶
- DataType
string
- Default
'UTF-8'
- Required
false
- Description
Encoding
doubleEncode¶
- DataType
boolean
- Default
true
- Required
false
- Description
If FALSE html entities will not be encoded