add sanitize_filename() to datetime

This commit is contained in:
w-e-w 2022-10-22 22:31:02 +09:00 committed by AUTOMATIC1111
parent 480d8e7646
commit 00952fb4a8

View File

@ -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