flosch / pongo2

Django-syntax like template-engine for Go
https://www.schlachter.tech/pongo2
MIT License
2.87k stars 270 forks source link

Make Autoescape a template parameter #312

Open wrouesnel opened 2 years ago

wrouesnel commented 2 years ago

Currently the only way to set autoescape is either via a template directive, or globally via pongo2.SetAutoescape. There's no way to set it for individual template sets or before template execution via Options.

The request here is to expand the Options object to allow controlling the Autoescape parameter's default value prior to template execution.