Restrict more characters (Closes #566)
This commit is contained in:
parent
799c076384
commit
627dcfff39
2 changed files with 8 additions and 7 deletions
|
@ -330,7 +330,7 @@ def sanitize_filename(s, restricted=False):
|
|||
return '_-' if restricted else ' -'
|
||||
elif char in '\\/|*<>':
|
||||
return '_'
|
||||
if restricted and (char in '!&\'' or char.isspace()):
|
||||
if restricted and (char in '!&\'()[]{}$;`^,#' or char.isspace()):
|
||||
return '_'
|
||||
if restricted and ord(char) > 127:
|
||||
return '_'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue