Fix for the piping problem (#395)

This commit is contained in:
OzzieIsaacs
2017-11-28 08:54:21 +01:00
parent 6e714f3f16
commit b4aede78bc
2 changed files with 3 additions and 2 deletions

View File

@ -281,7 +281,8 @@ def get_valid_filename(value, replace_whitespace=True):
if replace_whitespace:
#*+:\"/<>? are replaced by _
value = re.sub(r'[\*\+:\\\"/<>\?]+', u'_', value, flags=re.U)
# pipe has to be replaced with comma
value = re.sub(r'[\|]+', u',', value, flags=re.U)
value = value[:128]
if not value:
raise ValueError("Filename cannot be empty")