Skip to content

Escape Once ​

Escapes the HTML special characters in a string, and keeps the entities that are already escaped.

Example ​

liquid
{{ '<p> Tom & Jerry' | escape_once }}

Output

html
<p> Tom & Jerry