mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 13:43:47 +00:00
Merge remote-tracking branch 'adv/escape-filename'
This commit is contained in:
commit
7acf4d40a4
@ -266,6 +266,7 @@ def get_valid_filename(value, replace_whitespace=True):
|
|||||||
"""
|
"""
|
||||||
if value[-1:] == u'.':
|
if value[-1:] == u'.':
|
||||||
value = value[:-1]+u'_'
|
value = value[:-1]+u'_'
|
||||||
|
value = value.replace("/", "_").replace(":", "_")
|
||||||
if use_unidecode:
|
if use_unidecode:
|
||||||
value=(unidecode.unidecode(value)).strip()
|
value=(unidecode.unidecode(value)).strip()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user