format.htmlspecialchars

Applies htmlspecialchars() escaping to a value

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
true
Description
Value to format

keepQuotes

DataType
boolean
Required
true
Description
If TRUE quotes will not be replaced (ENT_NOQUOTES)

encoding

DataType
string
Default
‘UTF-8’
Required
true
Description
Encoding

doubleEncode

DataType
boolean
Default
true
Required
true
Description
If FALSE html entities will not be encoded