Filters are used to transform a variable before outputting it. You can attach one or many filters to a variable, and you can add your own filters to augment the ones built-in to Dust.
Filters are attached to a Dust reference by adding a pipe
| and the filter name after the reference name. You can chain filters by adding multiple pipes. The filters will be run from left-to-right.
s– turn off automatic HTML encoding
Dust applies the
h filter to all references by default, ensuring that variables are HTML-escaped. You can undo this autoescaping by appending the
Creating a new filter
See the filter API.