Replace characters

master
Bob Mottram 2019-08-25 23:16:05 +01:00
parent 432b5ef643
commit 6a497a3d53
2 changed files with 3 additions and 3 deletions

View File

@ -1039,8 +1039,8 @@ class PubServer(BaseHTTPRequestHandler):
if m.startswith('mention='):
replyToList.append(m.replace('mention=',''))
inReplyToUrl=mentionsList[0]
if inReplyToUrl.startswith('share:'):
shareDescription=inReplyToUrl
if inReplyToUrl.startswith('sharedesc:'):
shareDescription=inReplyToUrl.replace('sharedesc:','').replace('%20',' ').replace('%40','@').replace('%3A',':').replace('%23','#')
self.path=self.path.split('?replydm=')[0]+'/newdm'
if self.server.debug:
print('DEBUG: replydm path '+self.path)

View File

@ -149,7 +149,7 @@ def htmlSearchSharedItems(baseDir: str,searchStr: str, \
sharedItemsForm+='<b>Category:</b> '+sharedItem['category']+' '
sharedItemsForm+='<b>Location:</b> '+sharedItem['location']+'</p>'
contactActor=httpPrefix+'://'+domainFull+'/users/'+contactNickname
sharedItemsForm+='<p><a href="'+actor+'?replydm=share:'+sharedItem['displayName']+'?mention='+contactActor+'">Contact</a>'
sharedItemsForm+='<p><a href="'+actor+'?replydm=sharedesc:'+sharedItem['displayName']+'?mention='+contactActor+'">Contact</a>'
sharedItemsForm+='</div>'
if not resultsExist and currPage>1:
# previous page link, needs to be a POST