Skip to content

Escape ​

Escapes the HTML special characters in a string. The filter replaces them with their HTML entities.

Example ​

liquid
{{ '<p>Tom & Jerry</p>' | escape }}

Output

html
&lt;p&gt;Tom &amp; Jerry&lt;/p&gt;