We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
select_autoescape
default_for_string
False
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.
True
Should default_for_string not be False, just like default?
default
Environment:
The text was updated successfully, but these errors were encountered:
enable-jinja2-autoescape
autoescape=select_autoescape()
No branches or pull requests
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:
The text was updated successfully, but these errors were encountered: