mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-30 21:41:57 -04:00
...
This commit is contained in:
parent
6a7c77c41c
commit
aae106cdf3
@ -22,7 +22,7 @@ from calibre.utils.imghdr import what
|
||||
def sanitize_file_name(x):
|
||||
ans = re.sub(r'\s+', ' ', re.sub(r'[?&=;#]', '_', ascii_filename(x))).strip().rstrip('.')
|
||||
ans, ext = ans.rpartition('.')[::2]
|
||||
return ans.strip() + '.' + ext.strip()
|
||||
return (ans.strip() + '.' + ext.strip()).rstrip('.')
|
||||
|
||||
|
||||
class HTMLInput(InputFormatPlugin):
|
||||
|
Loading…
x
Reference in New Issue
Block a user