diff --git a/daemon.py b/daemon.py index 635cd8ec..daca6af8 100644 --- a/daemon.py +++ b/daemon.py @@ -1674,8 +1674,7 @@ class PubServer(BaseHTTPRequestHandler): self.path=self.path.split('?')[0] # show the search screen msg=htmlSearch(self.server.translate, \ - self.server.baseDir,self.path, \ - self.server.defaultTimeline).encode() + self.server.baseDir,self.path).encode() self._set_headers('text/html',len(msg),cookie) self._write(msg) self.server.GETbusy=False @@ -4646,6 +4645,11 @@ class PubServer(BaseHTTPRequestHandler): self.path.replace('/searchhandle','') length = int(self.headers['Content-length']) searchParams=self.rfile.read(length).decode('utf-8') + if 'submitBack=' in searchParams: + # go back on search screen + self._redirect_headers(actorStr+'/'+self.server.defaultTimeline,cookie) + self.server.POSTbusy=False + return if 'searchtext=' in searchParams: searchStr=searchParams.split('searchtext=')[1] if '&' in searchStr: diff --git a/webinterface.py b/webinterface.py index bc69ac80..403076a6 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3808,23 +3808,20 @@ def htmlHashTagSwarm(baseDir: str,actor: str) -> str: return tagSwarmHtml def htmlSearch(translate: {}, \ - baseDir: str,path: str, \ - defaultTimeline:str) -> str: + baseDir: str,path: str) -> str: """Search called from the timeline icon """ actor=path.replace('/search','') nickname=getNicknameFromActor(actor) domain,port=getDomainFromActor(actor) - backUrl=actor+'/'+defaultTimeline - if os.path.isfile(baseDir+'/img/search-background.png'): if not os.path.isfile(baseDir+'/accounts/search-background.png'): copyfile(baseDir+'/img/search-background.png',baseDir+'/accounts/search-background.png') cssFilename=baseDir+'/epicyon-follow.css' if os.path.isfile(baseDir+'/follow.css'): - cssFilename=baseDir+'/follow.css' + cssFilename=baseDir+'/follow.css' with open(cssFilename, 'r') as cssFile: profileStyle = cssFile.read() followStr=htmlHeader(cssFilename,profileStyle) @@ -3835,7 +3832,7 @@ def htmlSearch(translate: {}, \ followStr+='
' followStr+=' ' followStr+='
' - followStr+=' ' + followStr+=' ' followStr+=' ' followStr+='
' followStr+='

'+htmlHashTagSwarm(baseDir,actor)+'

'