Do not autoescape part full-name template (#6024)

* Do not autoescape part full-name template

* Add skipqc

* Adjust skipqc

* Provide custom select_autoescape

* Remove comment
This commit is contained in:
Oliver 2023-12-04 13:29:07 +11:00 committed by GitHub
parent 6373f6077f
commit 025cc47b81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ import os
from django.conf import settings
from jinja2 import Environment
from jinja2 import Environment, select_autoescape
logger = logging.getLogger('inventree')
@ -32,10 +32,8 @@ def compile_full_name_template(*args, **kwargs):
if template_string == _part_full_name_template_string and _part_full_name_template is not None:
return _part_full_name_template
_part_full_name_template_string = template_string
env = Environment(
autoescape=True,
autoescape=select_autoescape(default_for_string=False, default=False),
variable_start_string='{{',
variable_end_string='}}'
)