mirror of https://gitlab.com/bashrc2/epicyon
Avoid spaces in shared item description
parent
641eff191c
commit
cb228fe8da
|
@ -10557,6 +10557,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inReplyToUrl.replace('sharedesc:', '')
|
||||
shareDescription = \
|
||||
urllib.parse.unquote_plus(shareDescription.strip())
|
||||
shareDescription = shareDescription.replace('_', ' ')
|
||||
self.path = self.path.split('?replydm=')[0]+'/newdm'
|
||||
if self.server.debug:
|
||||
print('DEBUG: replydm path ' + self.path)
|
||||
|
|
|
@ -49,9 +49,12 @@ def getLeftColumnShares(baseDir: str,
|
|||
ctr = 0
|
||||
for published, item in sharesJson.items():
|
||||
sharedesc = item['displayName']
|
||||
if '<' in sharedesc or '?' in sharedesc:
|
||||
continue
|
||||
contactActor = item['actor']
|
||||
shareLink = actor + \
|
||||
'?replydm=sharedesc:' + sharedesc + \
|
||||
'?replydm=sharedesc:' + \
|
||||
sharedesc.replace(' ', '_') + \
|
||||
'?mention=' + contactActor
|
||||
linksList.append(sharedesc + ' ' + shareLink)
|
||||
ctr += 1
|
||||
|
|
|
@ -627,18 +627,20 @@ def htmlIndividualShare(actor: str, item: {}, translate: {},
|
|||
'<b>' + translate['Category'] + ':</b> ' + item['category'] + ' '
|
||||
profileStr += \
|
||||
'<b>' + translate['Location'] + ':</b> ' + item['location'] + '</p>\n'
|
||||
if showContact:
|
||||
contactActor = item['actor']
|
||||
profileStr += \
|
||||
'<p><a href="' + actor + \
|
||||
'?replydm=sharedesc:' + item['displayName'] + \
|
||||
'?mention=' + contactActor + '"><button class="button">' + \
|
||||
translate['Contact'] + '</button></a>\n'
|
||||
if removeButton:
|
||||
profileStr += \
|
||||
' <a href="' + actor + '?rmshare=' + item['displayName'] + \
|
||||
'"><button class="button">' + \
|
||||
translate['Remove'] + '</button></a>\n'
|
||||
sharedesc = item['displayName']
|
||||
if '<' not in sharedesc and '?' not in sharedesc:
|
||||
if showContact:
|
||||
contactActor = item['actor']
|
||||
profileStr += \
|
||||
'<p><a href="' + actor + \
|
||||
'?replydm=sharedesc:' + sharedesc + \
|
||||
'?mention=' + contactActor + '"><button class="button">' + \
|
||||
translate['Contact'] + '</button></a>\n'
|
||||
if removeButton:
|
||||
profileStr += \
|
||||
' <a href="' + actor + '?rmshare=' + sharedesc + \
|
||||
'"><button class="button">' + \
|
||||
translate['Remove'] + '</button></a>\n'
|
||||
profileStr += '</div>\n'
|
||||
return profileStr
|
||||
|
||||
|
|
Loading…
Reference in New Issue