1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-25 04:17:40 +00:00

New progress bar

This commit is contained in:
OzzieIsaacs
2017-11-29 15:54:17 +01:00
parent 03ab03f06e
commit f890fc1553
5 changed files with 70 additions and 177 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")