Try slashes in convthread

merge-requests/30/head
Bob Mottram 2024-02-15 19:27:05 +00:00
parent c0d569968a
commit 7bf305f9f2
1 changed files with 7 additions and 7 deletions

View File

@ -1311,7 +1311,7 @@ def _announce_unattributed_html(translate: {},
announces_str = translate[announces_str]
post_id = remove_id_ending(post_json_object['object']['id'])
post_link = '/users/' + nickname + '?convthread=' + \
post_id.replace('/', '--')
post_id.replace('--', '/')
return ' <img loading="lazy" decoding="async" title="' + \
announces_str + '" alt="' + \
announces_str + '" src="/icons' + \
@ -1332,7 +1332,7 @@ def _announce_with_display_name_html(translate: {},
announces_str = translate[announces_str]
post_id = remove_id_ending(post_json_object['object']['id'])
post_link = '/users/' + nickname + '?convthread=' + \
post_id.replace('/', '--')
post_id.replace('--', '/')
return ' <img loading="lazy" decoding="async" title="' + \
announces_str + '" alt="' + \
announces_str + '" src="/' + \
@ -1497,7 +1497,7 @@ def _reply_to_unknown_html(translate: {},
replying_to_str = _replying_to_with_scope(post_json_object, translate)
post_id = get_reply_to(post_json_object['object'])
post_link = '/users/' + nickname + '?convthread=' + \
post_id.replace('/', '--')
post_id.replace('--', '/')
return ' <img loading="lazy" decoding="async" title="' + \
replying_to_str + '" alt="' + \
replying_to_str + '" src="/icons' + \
@ -1527,7 +1527,7 @@ def _reply_with_unknown_path_html(translate: {},
replying_to_str = _replying_to_with_scope(post_json_object, translate)
post_id = get_reply_to(post_json_object['object'])
post_link = '/users/' + nickname + '?convthread=' + \
post_id.replace('/', '--')
post_id.replace('--', '/')
return ' <img loading="lazy" decoding="async" title="' + \
replying_to_str + \
'" alt="' + replying_to_str + \
@ -1548,7 +1548,7 @@ def _get_reply_html(translate: {},
return ''
replying_to_str = _replying_to_with_scope(post_json_object, translate)
post_link = '/users/' + nickname + '?convthread=' + \
in_reply_to.replace('/', '--')
in_reply_to.replace('--', '/')
return ' ' + \
'<img loading="lazy" decoding="async" title="' + \
replying_to_str + '" alt="' + \
@ -1833,7 +1833,7 @@ def _get_footer_with_icons(show_icons: bool,
translate)
# show the date
date_link = '/users/' + nickname + '?convthread=' + \
published_link.replace('/', '--')
published_link.replace('--', '/')
footer_str += '<a href="' + date_link + '" class="' + \
time_class + '" tabindex="10"><span itemprop="datePublished">' + \
published_str + '</span></a>\n'
@ -2679,7 +2679,7 @@ def individual_post_as_html(signing_priv_key_pem: str,
footer_str += _get_copyright_footer(content_license_url,
translate)
conv_link = '/users/' + nickname + '?convthread=' + \
published_link.replace('/', '--')
published_link.replace('--', '/')
footer_str += '<a href="' + conv_link + \
'" class="' + time_class + '" tabindex="10">' + \
published_str + '</a>\n'