Commit cda733f4 authored by Jonathan Rehm's avatar Jonathan Rehm

Escape special characters in file names

Follows Calibre's convention of using underscores as replacements
parent bd02c921
......@@ -266,6 +266,7 @@ def get_valid_filename(value, replace_whitespace=True):
"""
if value[-1:] == u'.':
value = value[:-1]+u'_'
value = value.replace("/", "_").replace(":", "_")
if use_unidecode:
value=(unidecode.unidecode(value)).strip()
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment