mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-31 15:23:02 +00:00 
			
		
		
		
	Escape special characters in file names
Follows Calibre's convention of using underscores as replacements
This commit is contained in:
		| @@ -266,6 +266,7 @@ def get_valid_filename(value, replace_whitespace=True): | |||||||
|     """ |     """ | ||||||
|     if value[-1:] == u'.': |     if value[-1:] == u'.': | ||||||
|         value = value[:-1]+u'_' |         value = value[:-1]+u'_' | ||||||
|  |     value = value.replace("/", "_").replace(":", "_") | ||||||
|     if use_unidecode: |     if use_unidecode: | ||||||
|         value=(unidecode.unidecode(value)).strip() |         value=(unidecode.unidecode(value)).strip() | ||||||
|     else: |     else: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonathan Rehm
					Jonathan Rehm