diff --git a/Whatsapp_Chat_Exporter/extract.py b/Whatsapp_Chat_Exporter/extract.py index 02182f9..9415300 100644 --- a/Whatsapp_Chat_Exporter/extract.py +++ b/Whatsapp_Chat_Exporter/extract.py @@ -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 diff --git a/Whatsapp_Chat_Exporter/extract_iphone.py b/Whatsapp_Chat_Exporter/extract_iphone.py index 9d24aff..c56f50f 100644 --- a/Whatsapp_Chat_Exporter/extract_iphone.py +++ b/Whatsapp_Chat_Exporter/extract_iphone.py @@ -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