`select_autoescape` default value for `default_for_string` should be `False`
clavedeluna opened this issue · comments
Dani Alcala commented
According to jinja's select_autoescape documentation
The select_autoescape() function returns a function that works roughly like this:
def autoescape(template_name):
if template_name is None:
return False
Furthermore, the docs makes it clear that jinja's default autoescape is still False
. So, If I setup autoescape like this:
from jinja2 import Environment, select_autoescape
env = Environment(autoescape=select_autoescape())
I would expect autoescape to end up as False
However, in the code here when template_name is None, it returns the default value of default_for_string
, which at this time is True
.
Should default_for_string
not be False
, just like default
?
Environment:
- Python version:
- Jinja version: 3.0.x