Merge pull request #12327 from catboxanon/fix/filename-invalid-chars

Add tab and carriage return to invalid filename chars
This commit is contained in:
AUTOMATIC1111 2023-08-05 07:47:07 +03:00 committed by GitHub
commit e64263653a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,7 +318,7 @@ def resize_image(resize_mode, im, width, height, upscaler_name=None):
return res
invalid_filename_chars = '<>:"/\\|?*\n'
invalid_filename_chars = '<>:"/\\|?*\n\r\t'
invalid_filename_prefix = ' '
invalid_filename_postfix = ' .'
re_nonletters = re.compile(r'[\s' + string.punctuation + ']+')