scrub % in titles, resolves #55

This commit is contained in:
meeb 2021-02-18 16:35:10 +11:00
parent e0669b107d
commit 895bfe6f87
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def append_uri_params(uri, params):
def clean_filename(filename): def clean_filename(filename):
if not isinstance(filename, str): if not isinstance(filename, str):
raise ValueError(f'filename must be a str, got {type(filename)}') raise ValueError(f'filename must be a str, got {type(filename)}')
to_scrub = '<>\/:*?"|' to_scrub = '<>\/:*?"|%'
for char in to_scrub: for char in to_scrub:
filename = filename.replace(char, '') filename = filename.replace(char, '')
filename = ''.join([c for c in filename if ord(c) > 30]) filename = ''.join([c for c in filename if ord(c) > 30])