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 }}
Code
{{ '<p>Text to be escaped.</p>' | escape }}Output
<p>Text to be escaped.</p>
Output
<p>Text to be escaped.</p>Was this page helpful?