Open jmeowmeow opened 1 year ago
The docs should follow Jinja in explaining the " | safe" filter in the context of autoescaping, to avoid new adopters getting confused as to why internally configured URL references like {{ config.base_url }} are uselessly escaped.
Tera Autoescaping: https://tera.netlify.app/docs/#auto-escaping
Tera Docs Source (Autoescaping): https://github.com/Keats/tera/blob/0f6d00d31583168b85498c7690f045bc42ce7511/docs/content/docs/_index.md?plain=1#L102
Jinja Autoescaping and "safe" in context: https://jinja.palletsprojects.com/en/3.1.x/templates/#working-with-automatic-escaping
If you know you have data that is already safe but not marked, be sure to wrap it in Markup or use the |safe filter. Jinja functions (macros, super, self.BLOCKNAME) always return template data that is marked as safe.
If you know you have data that is already safe but not marked, be sure to wrap it in Markup or use the |safe filter.
|safe
Jinja functions (macros, super, self.BLOCKNAME) always return template data that is marked as safe.
New adopter unaware of |safe : https://zola.discourse.group/t/adding-canonical-links-to-pages/1495
The docs should follow Jinja in explaining the " | safe" filter in the context of autoescaping, to avoid new adopters getting confused as to why internally configured URL references like {{ config.base_url }} are uselessly escaped.
Tera Autoescaping: https://tera.netlify.app/docs/#auto-escaping
Tera Docs Source (Autoescaping): https://github.com/Keats/tera/blob/0f6d00d31583168b85498c7690f045bc42ce7511/docs/content/docs/_index.md?plain=1#L102
Jinja Autoescaping and "safe" in context: https://jinja.palletsprojects.com/en/3.1.x/templates/#working-with-automatic-escaping
New adopter unaware of
|safe
: https://zola.discourse.group/t/adding-canonical-links-to-pages/1495