From aae106cdf3bbea78931274f965325e3570715874 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 22 Aug 2018 08:31:28 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/conversion/plugins/html_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/conversion/plugins/html_input.py b/src/calibre/ebooks/conversion/plugins/html_input.py index 5717e79b24..4439456a08 100644 --- a/src/calibre/ebooks/conversion/plugins/html_input.py +++ b/src/calibre/ebooks/conversion/plugins/html_input.py @@ -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):