[plugin] NewsDownloader: reduce HTML idiosyncracies (#12976)

This commit is contained in:
Frans de Jonge
2025-01-02 12:42:10 +01:00
committed by GitHub
parent 0ff8913a4e
commit 10f627e3f9

View File

@@ -614,11 +614,18 @@ function NewsDownloader:createFromDescription(feed, title, content, feed_output_
logger.dbg("NewsDownloader: News file will be stored to :", news_file_path)
local article_message = T(_("%1\n%2"), message, title_with_date)
local footer = _("If this is only a summary, the full article can be downloaded by going to the News Downloader settings and changing 'Download full article' to 'true'.")
local html = string.format([[<!DOCTYPE html>
local html = string.format([[
<!DOCTYPE html>
<html>
<head><meta charset='UTF-8'><title>%s</title></head>
<body><header><h2>%s</h2></header><article>%s</article>
<br><footer><small>%s</small></footer>
<head>
<meta charset="UTF-8">
<title>%s</title>
</head>
<body>
<header><h1>%s</h1></header>
<article>%s</article>
<br>
<footer><small>%s</small></footer>
</body>
</html>]], title, title, content, footer)
local link = getFeedLink(feed.link)