Commit 00952fb4 authored by w-e-w's avatar w-e-w Committed by AUTOMATIC1111

add sanitize_filename() to datetime

parent 480d8e76
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment