escape
string | escape
returns string
Escapes special characters in HTML, such as <>
, '
, and &
, and converts characters into escape sequences. The filter doesn't effect characters within the string that don’t have a corresponding escape sequence.".
{{ '<p>Text to be escaped.</p>' | escape }}
{{ '<p>Text to be escaped.</p>' | escape }}
Output
<p>Text to be escaped.</p>
Was this page helpful?