Open clavedeluna opened 11 months ago
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
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:
False
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.
default_for_string
True
Should default_for_string not be False, just like default?
default
Environment:
According to jinja's select_autoescape documentation
Furthermore, the docs makes it clear that jinja's default autoescape is still
False
. So, If I setup autoescape like this: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 isTrue
.Should
default_for_string
not beFalse
, just likedefault
?Environment: