From 8cc7808afbbaab99540929b4b0119a3422cc135b Mon Sep 17 00:00:00 2001 From: profitroll Date: Sun, 12 Mar 2023 22:14:41 +0100 Subject: [PATCH] Disabled slash-escape for .json --- modules/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/utils.py b/modules/utils.py index 34edf99..ab518d8 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -33,7 +33,11 @@ def jsonSave(contents: Any, filename: str) -> None: """Dumps dict/list arg1 to file arg2""" try: with open(filename, "w", encoding="utf8") as file: - file.write(dumps(contents, ensure_ascii=False, indent=4)) + file.write( + dumps( + contents, ensure_ascii=False, indent=4, escape_forward_slashes=False + ) + ) file.close() except Exception as exp: logWrite(f"Could not save json file {filename}: {exp}\n{print_exc()}")