mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
598 B
598 B
Modifier escape
The modifier escapes a string for safe insertion into the output. It supports different escaping strategies depending on the template context. By default, it uses the HTML escaping strategy:
{$post.title|escape:'html'}
The modifier supports the following escaping strategies:
- html: escapes a string for the HTML body context.
- url: escapes a string for the URI or parameter contexts.
- js: escapes a string for the JavaScript context.
For convenience, the e
modifier is defined as an alias of escape
modifier.
Second parameter is charset.