parent
b5c5d84f60
commit
639f1cea92
4 changed files with 11 additions and 2 deletions
|
|
@ -2107,6 +2107,8 @@ def sanitize_filename(s, restricted=False, is_id=False):
|
|||
return '_'
|
||||
return char
|
||||
|
||||
if s == '':
|
||||
return ''
|
||||
# Handle timestamps
|
||||
s = re.sub(r'[0-9]+(?::[0-9]+)+', lambda m: m.group(0).replace(':', '_'), s)
|
||||
result = ''.join(map(replace_insane, s))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue