escape_once

Filter = escape_once

Escapes a string without changing existing escaped entities. It doesn’t change strings that don’t have anything to escape.

INPUT

OUTPUT

{{ "1 < 2 & 3" | escape_once }}

1 &lt; 2 &amp; 3

INPUT

OUTPUT

{{ "1 &lt; 2 &amp; 3" | escape_once }}

1 &lt; 2 &amp; 3