Handle trailing slashes

main
Bob Mottram 2020-10-19 23:21:30 +01:00
parent 5297eb1b64
commit 302e1ed036
1 changed files with 5 additions and 1 deletions

View File

@ -492,7 +492,11 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
postUrl = url
if mirrored and '://' in url:
postUrl = '/newsmirror/' + statusNumber + '/' + \
url.split('://')[1] + '/index.html'
url.split('://')[1]
if postUrl.endswith('/'):
postUrl += 'index.html'
else:
postUrl += '/index.html'
# add the off-site link to the description
if rssDescription and not dangerousMarkup(rssDescription):