Unquote hashtags

main
Bob Mottram 2020-04-15 10:39:30 +01:00
parent b435af8d76
commit e8f4b35630
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ __status__ = "Production"
import time
import os
import urllib.parse
from collections import OrderedDict
from datetime import datetime
from datetime import date
@ -500,6 +501,7 @@ def htmlHashtagSearch(nickname: str, domain: str, port: int,
"""
if hashtag.startswith('#'):
hashtag = hashtag[1:]
hashtag = urllib.parse.unquote(hashtag)
hashtagIndexFile = baseDir + '/tags/' + hashtag + '.txt'
if not os.path.isfile(hashtagIndexFile):
print('WARN: hashtag file not found ' + hashtagIndexFile)