Different substitutions

main
Bob Mottram 2021-07-27 21:14:13 +01:00
parent 6e7b508b80
commit ad693e91f8
2 changed files with 4 additions and 4 deletions

View File

@ -91,8 +91,8 @@ def getValidSharedItemID(actor: str, displayName: str) -> str:
displayName = displayName.replace(ch, '-')
displayName = displayName.replace('.', '_')
displayName = displayName.replace("", "'")
actor = actor.replace('://', '--##')
actor = actor.replace('/', '#')
actor = actor.replace('://', '___')
actor = actor.replace('/', '--')
return actor + '#shareditems#' + displayName

View File

@ -384,8 +384,8 @@ def sharesTimelineJson(actor: str, pageNumber: int, itemsPerPage: int,
shareActor = ''
if '#shareditems#' in itemID:
shareActor = itemID.split('#shareditems#')[0]
shareActor = shareActor.replace('--##', '://')
shareActor = shareActor.replace('#', '/')
shareActor = shareActor.replace('___', '://')
shareActor = shareActor.replace('--', '/')
item['actor'] = shareActor
allSharesJson[str(item['published'])] = item
ctr += 1