$field->escape()
Escapes the field value to be safely used in HTML templates without the risk of XSS attacks
Parameters
Name | Type | Default | Description |
---|---|---|---|
$context | string |
'html' |
Location of output (html , attr , js , css , url or xml ) |
Aliases
You can use the following aliases for this field method in your template:
$field->esc(…)