diff --git a/report-api/src/api/services/report_service.py b/report-api/src/api/services/report_service.py index e57ef33de..0592e6462 100644 --- a/report-api/src/api/services/report_service.py +++ b/report-api/src/api/services/report_service.py @@ -25,7 +25,7 @@ from api.utils.util import TEMPLATE_FOLDER_PATH -ENV = Environment(loader=FileSystemLoader('.'), autoescape=JINJA_AUTO_ESCAPE) +ENV = Environment(loader=FileSystemLoader('.'), autoescape=True) class ReportService: @@ -46,7 +46,7 @@ def create_report_from_template(cls, template_string: str, template_args: object generate_page_number: bool = False): """Create a report from a json template.""" template_decoded = base64.b64decode(template_string).decode('utf-8') - template_ = Template(template_decoded, autoescape=JINJA_AUTO_ESCAPE) + template_ = Template(template_decoded, autoescape=True) html_out = template_.render(template_args) return ReportService.generate_pdf(html_out, generate_page_number) diff --git a/report-api/src/api/utils/constants.py b/report-api/src/api/utils/constants.py index d6f1a393a..ec4aac5ca 100644 --- a/report-api/src/api/utils/constants.py +++ b/report-api/src/api/utils/constants.py @@ -13,4 +13,3 @@ # limitations under the License. """Constants.""" -JINJA_AUTO_ESCAPE = True