escape
Converts special characters in HTML (e.g. &, <>, etc.) into their corresponding escape sequences. Characters in the string without corresponding escape sequences will remain unchanged by this helper.
Parameters
str{String}: The input string. This parameter is required.returns{String}: The escaped string.
Usage
{{ escape str }}
Example
{{ escape '<p>hello</p>' }} <!-- Outputs: '<p>hello</p>' -->
Was this article helpful to you?