Dash instead of hash

main
Bob Mottram 2021-12-16 22:26:46 +00:00
parent f9bbfdd8cd
commit e9b98b82ce
3 changed files with 2 additions and 3 deletions

View File

@ -7412,7 +7412,6 @@ class PubServer(BaseHTTPRequestHandler):
"""Shows a favicon image obtained from the cache
"""
mediaFilename = baseDir + urllib.parse.unquote_plus(path)
print('showCachedFavicon: ' + mediaFilename)
if not os.path.isfile(mediaFilename):
self._404()
return

View File

@ -156,7 +156,7 @@ def _downloadNewswireFeedFavicon(session, baseDir: str,
return False
if not os.path.isdir(baseDir + '/favicons'):
os.mkdir(baseDir + '/favicons')
linkFilename = favUrl.replace('/', '#')
linkFilename = favUrl.replace('/', '-')
imageFilename = baseDir + '/favicons/' + linkFilename
if os.path.isfile(imageFilename):
return True

View File

@ -240,7 +240,7 @@ def _htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
faviconUrl = getNewswireFaviconUrl(url)
faviconLink = ''
if faviconUrl:
favBase = '/favicons/' + faviconUrl.replace('/', '#')
favBase = '/favicons/' + faviconUrl.replace('/', '-')
cachedFaviconFilename = baseDir + favBase
if os.path.isfile(cachedFaviconFilename):
faviconUrl = favBase