Expected Behavior
From the jinja docs:
"Note that this is available in templates through the |tojson filter which will also mark the result as safe. "
Actual Behavior
tojson doesn't seem to be marking the output as safe, so if we establish the jinja
environment with autoescape enabled, and then use tojson, we must add "|safe"
at the end.
Your Environment
- Python version: 3.5.3
- Jinja version: 2.9.6
Expected Behavior
From the jinja docs:
"Note that this is available in templates through the |tojson filter which will also mark the result as safe. "
Actual Behavior
tojson doesn't seem to be marking the output as safe, so if we establish the jinja
environment with autoescape enabled, and then use tojson, we must add "|safe"
at the end.
Your Environment