Support png favicons

main
Bob Mottram 2021-12-17 10:36:22 +00:00
parent d5e9652b16
commit adedd62251
1 changed files with 6 additions and 0 deletions

View File

@ -244,6 +244,12 @@ def _htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
cachedFaviconFilename = baseDir + favBase
if os.path.isfile(cachedFaviconFilename):
faviconUrl = favBase
else:
favBase = favBase.replace('.ico', '.png')
cachedFaviconFilename = baseDir + favBase
if os.path.isfile(cachedFaviconFilename):
faviconUrl = favBase
faviconLink = \
'<img loading="lazy" src="' + faviconUrl + '" ' + \
'alt="" ' + _getBrokenFavSubstitute() + '/>'