From 6fd48d8739eb044f25e0e9fd2c6042601638ce99 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Thu, 26 Mar 2026 17:30:20 +0100 Subject: [PATCH] [fix] NewsDownloader: reduce content-type to mimetype (#15189) Fixes #15174. Regression in #15065. --- plugins/newsdownloader.koplugin/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/newsdownloader.koplugin/main.lua b/plugins/newsdownloader.koplugin/main.lua index f35b7e1a7..d4beb0444 100644 --- a/plugins/newsdownloader.koplugin/main.lua +++ b/plugins/newsdownloader.koplugin/main.lua @@ -776,7 +776,9 @@ function NewsDownloader:downloadFeed(feed, cookies, http_auth, feed_output_dir, if not content_type then logger.err("NewsDownloader: No content type, not saving", link) return - elseif content_type == "text/html" or content_type == "application/xhtml+xml" then + end + content_type = util.trim(content_type:match("^[^;]*")) --- @todo Don't ignore encoding but use it for the EPUB. + if content_type == "text/html" or content_type == "application/xhtml+xml" then DownloadBackend:createEpub(news_file_path, content, link, include_images, article_message, enable_filter, filter_element, block_element) elseif DocumentRegistry:hasProvider(nil, content_type) then local file = io.open(news_file_path, "w")