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):