diff --git a/src/formatters/discussions.py b/src/formatters/discussions.py index b371c98..7cb4998 100644 --- a/src/formatters/discussions.py +++ b/src/formatters/discussions.py @@ -48,6 +48,7 @@ async def feeds_compact_formatter(post_type, post, message_target, wiki, article elif post_type == "ARTICLE_COMMENT": if article_page is None: article_page = {"title": _("unknown"), "fullUrl": wiki} # No page known + article_page["fullUrl"] = article_page["fullUrl"].replace(")", "\)").replace("()", "\(") if not post["isReply"]: message = "🗒️ "+_("[{author}]({author_url}) created a [comment](<{url}?commentId={commentId}>) on [{article}](<{url}>)").format(author=author, author_url=author_url, url=article_page["fullUrl"], article=article_page["title"], commentId=post["threadId"]) else: diff --git a/src/wiki.py b/src/wiki.py index 25421f2..148a7a1 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -232,5 +232,5 @@ async def essential_feeds(change: dict, comment_pages: dict, db_wiki: sqlite3.Ro if identification_string == "ARTICLE_COMMENT" and comment_pages is not None: comment_page = comment_pages.get(change["forumId"], None) if comment_page is not None: - comment_page["fullUrl"] = "/".join(db_wiki["wiki"].split("/", 3)[:3]) + comment_page["relativeUrl"].replace(")", "\)").replace("()", "\(") + comment_page["fullUrl"] = "/".join(db_wiki["wiki"].split("/", 3)[:3]) + comment_page["relativeUrl"] return await appearance_mode(identification_string, change, target, db_wiki["wiki"], article_page=comment_page)