From 00952fb4a8b86b75402cc8276e00f3daadf1f459 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Sat, 22 Oct 2022 22:31:02 +0900 Subject: [PATCH] add sanitize_filename() to datetime --- modules/images.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/images.py b/modules/images.py index 55d8ab5e..898b065b 100644 --- a/modules/images.py +++ b/modules/images.py @@ -400,6 +400,7 @@ def replace_datetime(input_str: str): # if format error then use default_time_format formatted_time = time_zone_time.strftime(default_time_format) + formatted_time = sanitize_filename_part(formatted_time, replace_spaces=False) input_str = input_str[:match.start()] + formatted_time + input_str[match.end():] return input_str