diff --git a/daemon.py b/daemon.py index 5acac776..252d20ec 100644 --- a/daemon.py +++ b/daemon.py @@ -2509,7 +2509,10 @@ class PubServer(BaseHTTPRequestHandler): sharedItemsStr= \ htmlSearchSharedItems(self.server.baseDir, \ searchStr,pageNumber, \ - maxPostsInFeed,actorStr) + maxPostsInFeed, \ + self.server.httpPrefix, \ + self.server.domainFull, \ + actorStr) if sharedItemsStr: msg=sharedItemsStr.encode('utf-8') self._login_headers('text/html',len(msg)) diff --git a/webinterface.py b/webinterface.py index daf421c6..6abe06c9 100644 --- a/webinterface.py +++ b/webinterface.py @@ -94,16 +94,15 @@ def htmlSearchEmoji(baseDir: str,searchStr: str) -> str: emojiForm+=htmlFooter() return emojiForm -def htmlSearchSharedItems(baseDir: str,searchStr: str,pageNumber: int,resultsPerPage: int,actor: str) -> str: +def htmlSearchSharedItems(baseDir: str,searchStr: str, \ + pageNumber: int, \ + resultsPerPage: int, \ + httpPrefix: str,domainFull: str,actor: str) -> str: """Search results for shared items """ currPage=1 ctr=0 - actorDomain,actorPort=getDomainFromActor(actor) - if actorPort: - if actorPort!=80 and actorPort!=443: - actorDomain=actorDomain+':'+str(actorPort) - actorHttpPrefix=actor.split('://')[0] + actor=httpPrefix+'://'+domainFull+actor sharedItemsForm='' searchStrLower=searchStr.replace('%2B','+').replace('%40','@').replace('%3A',':').replace('%23','#').lower().strip('\n') searchStrLowerList=searchStrLower.split('+') @@ -149,7 +148,7 @@ def htmlSearchSharedItems(baseDir: str,searchStr: str,pageNumber: int,resultsPer sharedItemsForm+='

Type: '+sharedItem['itemType']+' ' sharedItemsForm+='Category: '+sharedItem['category']+' ' sharedItemsForm+='Location: '+sharedItem['location']+'

' - contactActor=actorHttpPrefix+'://'+actorDomain+'/users/'+contactNickname + contactActor=httpPrefix+'://'+domainFull+'/users/'+contactNickname sharedItemsForm+='

Contact' sharedItemsForm+='' if not resultsExist and currPage>1: