mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
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:
parent
6373f6077f
commit
025cc47b81
@ -5,7 +5,7 @@ import os
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from jinja2 import Environment
|
from jinja2 import Environment, select_autoescape
|
||||||
|
|
||||||
logger = logging.getLogger('inventree')
|
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:
|
if template_string == _part_full_name_template_string and _part_full_name_template is not None:
|
||||||
return _part_full_name_template
|
return _part_full_name_template
|
||||||
|
|
||||||
_part_full_name_template_string = template_string
|
|
||||||
|
|
||||||
env = Environment(
|
env = Environment(
|
||||||
autoescape=True,
|
autoescape=select_autoescape(default_for_string=False, default=False),
|
||||||
variable_start_string='{{',
|
variable_start_string='{{',
|
||||||
variable_end_string='}}'
|
variable_end_string='}}'
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user