Skip to content

escape

Escapes HTML characters.

Output is escaped automatically (see “Auto-escaping”), so you rarely need this; it’s kept so ported themes work. Text is escaped once either way.

string | escape

string

Liquid
<img alt="{{ 'Oud & musk "gift" set' | escape }}">
Output
<img alt="Oud &amp; musk &#34;gift&#34; set">

Since theme platform 1.0.

Was this page helpful?