Learn

sanitize

Remove special characters from a variable.

Runs the variable through PHP’s htmlspecialchars function, converting characters like < and > into &lt; and &gt;, respectively.

Sample Usage

{{ comment|sanitize }}

If {{ username }} is Nice to <b>meet you.</b>, this will output Nice to &lt;b&gt; meet you.&lt;/b&gt;.

Parameters

This modifier has no parameters.

This article was last updated on March 30th, 2016. Find an error? Please let us know!