Returns an escaped version of the supplied text.
This will ensure that if the text is then displayed by a web browser it will not be interpreted as HTML. This helps prevent cross site scripting (XSS) attacks by preventing the injection of rogue JavaScript expressions.
Arguments
Argument | Type | Description |
---|---|---|
text | String, required | The text to escape |
Example
In this example the variable 'STUFF' has the value <p>.
helper.utilHtmlEsc(helper.getVariable('STUFF'))
Returns
"<p>"
Last modified on March 06, 2020