From 3cadde6579070023995c5cc501be4ac58ed4eb06 Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Sat, 18 Feb 2017 20:12:07 +0100 Subject: [PATCH] Fix for (#117) --- cps/helper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cps/helper.py b/cps/helper.py index 00ec9553..beee00c7 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -222,14 +222,14 @@ def get_valid_filename(value, replace_whitespace=True): if use_unidecode: value=(unidecode.unidecode(value)).strip() else: - value=value.replace('§','SS') - value=value.replace('ß','ss') + value=value.replace(u'§',u'SS') + value=value.replace(u'ß',u'ss') value = unicodedata.normalize('NFKD', value) re_slugify = re.compile('[\W\s-]', re.UNICODE) value = unicode(re_slugify.sub('', value).strip()) if replace_whitespace: #*+:\"/<>? werden durch _ ersetzt - value = re.sub('[\*\+:\\\"/<>\?]+', '_', value, flags=re.U) + value = re.sub('[\*\+:\\\"/<>\?]+', u'_', value, flags=re.U) value = value[:128] return value