Add autoescape to rendering

This commit is contained in:
KnugiHK
2023-06-16 01:10:24 +08:00
parent 594a04adbc
commit bfdc68cd6a
2 changed files with 2 additions and 2 deletions

View File

@@ -624,7 +624,7 @@ def create_html(
template_dir = os.path.dirname(template)
template_file = os.path.basename(template)
templateLoader = jinja2.FileSystemLoader(searchpath=template_dir)
template_env = jinja2.Environment(loader=templateLoader)
template_env = jinja2.Environment(loader=templateLoader, autoescape=True)
template_env.globals.update(
determine_day=determine_day,
no_avatar=no_avatar

View File

@@ -279,7 +279,7 @@ def create_html(
template_dir = os.path.dirname(template)
template_file = os.path.basename(template)
templateLoader = jinja2.FileSystemLoader(searchpath=template_dir)
template_env = jinja2.Environment(loader=templateLoader)
template_env = jinja2.Environment(loader=templateLoader, autoescape=True)
template_env.globals.update(
determine_day=determine_day,
no_avatar=no_avatar