From d7b3b714a1589199ee8e78f03266ea5492105dd4 Mon Sep 17 00:00:00 2001 From: journey-ad Date: Thu, 20 Apr 2023 12:19:25 +0800 Subject: [PATCH] fix error when filename contains `\t` --- bilix/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bilix/utils.py b/bilix/utils.py index ed92e412..2422736c 100644 --- a/bilix/utils.py +++ b/bilix/utils.py @@ -77,7 +77,7 @@ def replace_illegal(s: str): """strip, unescape html and replace os illegal character in s""" s = s.strip() s = html.unescape(s) # handel & "... - s = re.sub(r"[/\\:*?\"<>|\n]", '', s) # replace illegal filename character + s = re.sub(r"[/\\:*?\"<>|\n\t]", '', s) # replace illegal filename character return s