I want to automatically escape all template variables, that is, I want them to be escaped without having to write |escape
all the time. Thus I enabled the $escape_html
option.
However, apparently Smarty treats variables created using {capture}
the same way, even though these can be considered trusted input. We have a lot of those in our codebase and having to write nofilter
everywhere is almost as annoying as having to write |escape
.
Surely there must be a solution for this? Or are $escape_html
and {capture}
incompatible?