mirror of https://gitlab.com/bashrc2/epicyon
Replacing colon
parent
f9012cd948
commit
4f58cc98c1
|
@ -10230,8 +10230,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
return True
|
||||
|
||||
mediaStr = path.split('/sharefiles/')[1]
|
||||
mediaFilename = \
|
||||
baseDir + '/sharefiles/' + mediaStr
|
||||
mediaFilename = baseDir + '/sharefiles/' + mediaStr
|
||||
if not os.path.isfile(mediaFilename):
|
||||
self._404()
|
||||
return True
|
||||
|
|
|
@ -91,7 +91,9 @@ def getValidSharedItemID(actor: str, displayName: str) -> str:
|
|||
displayName = displayName.replace(ch, '-')
|
||||
displayName = displayName.replace('.', '_')
|
||||
displayName = displayName.replace("’", "'")
|
||||
return actor.replace('/', '#') + '#shareditems#' + displayName
|
||||
actor = actor.replace('://', '--##')
|
||||
actor = actor.replace('/', '#')
|
||||
return actor + '#shareditems#' + displayName
|
||||
|
||||
|
||||
def removeSharedItem(baseDir: str, nickname: str, domain: str,
|
||||
|
|
|
@ -384,6 +384,7 @@ def sharesTimelineJson(actor: str, pageNumber: int, itemsPerPage: int,
|
|||
shareActor = ''
|
||||
if '#shareditems#' in itemID:
|
||||
shareActor = itemID.split('#shareditems#')[0]
|
||||
shareActor = shareActor.replace('--##', '://')
|
||||
shareActor = shareActor.replace('#', '/')
|
||||
item['actor'] = shareActor
|
||||
allSharesJson[str(item['published'])] = item
|
||||
|
|
Loading…
Reference in New Issue