ez.no / exponential / documentation / reference / template operators / strings / wash
$string|wash( [type] )
| Name | Type | Description | Required |
|---|---|---|---|
| type | string | Type of wash. | no |
washed/friendly version of input string.
This is a general character/string washing operator. The first (and only) parameter specifies the washing type: email or xhtml; xhtml is default. If you have a string that contains bogus characters (or sequences) that could mess up your page, you should "wash" the string before outputting it.
Example 1
{"bogus string <"|wash} returns the string "bogus string <"
Example 2
{"hello@example.com"|wash("email")}
returns the string "hello[at]example[dot]com"
Comments