From aaf51b0effa1efdbe9044df21c66d14fc44b99f5 Mon Sep 17 00:00:00 2001 From: Thomas <71355143+thomas694@users.noreply.github.com> Date: Sun, 12 Feb 2023 17:15:45 +0100 Subject: [PATCH] Bugfix: control characters aren't allowed in windows filenames --- bdfr/file_name_formatter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bdfr/file_name_formatter.py b/bdfr/file_name_formatter.py index 1eac6d1..7f355c9 100644 --- a/bdfr/file_name_formatter.py +++ b/bdfr/file_name_formatter.py @@ -221,6 +221,7 @@ class FileNameFormatter: for char in invalid_characters: input_string = input_string.replace(char, "") input_string = FileNameFormatter._strip_emojis(input_string) + input_string = "".join(ch for ch in input_string if ord(ch) > 31 and ord(ch) != 127) return input_string @staticmethod