From bb755b2773919a39609cabdde9fd72caced3ecd2 Mon Sep 17 00:00:00 2001 From: profitroll Date: Tue, 2 Apr 2024 22:50:11 +0200 Subject: [PATCH] Fixed escape sequences --- main.py | 7 ++----- modules/utils.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index b3b9440..c103b83 100644 --- a/main.py +++ b/main.py @@ -145,7 +145,7 @@ def main(): ), } - template.render(context) + template.render(context, autoescape=True) makedirs("output", exist_ok=True) template.save(Path("output", f"{lang}.docx")) @@ -175,8 +175,5 @@ if __name__ == "__main__": ) main() if args.convert_output: - print( - f"Converting everything to PDF...", - flush=True, - ) + print("Converting everything to PDF...", flush=True) convert(Path("output").absolute()) diff --git a/modules/utils.py b/modules/utils.py index 15dc7df..5a47f98 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -26,7 +26,7 @@ def data_read(key: str, *args: str, locale: str) -> Any: try: output = nested_read(key, *args, data=locale_file) except (KeyError, ValueError): - default_file = locale_file = json_read(Path("data", f"default.json")) + default_file = locale_file = json_read(Path("data", "default.json")) try: output = nested_read(key, *args, data=locale_file) except (KeyError, ValueError):