From cda733f4a41586c54b1464751e3db76d979d9ebe Mon Sep 17 00:00:00 2001 From: Jonathan Rehm Date: Sat, 19 Aug 2017 11:55:55 -0700 Subject: [PATCH] Escape special characters in file names Follows Calibre's convention of using underscores as replacements --- cps/helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cps/helper.py b/cps/helper.py index e513ad8b..919e4531 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -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: