From 3a45643e2808d7e6a6547f8790e363396c524572 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 6 Dec 2020 09:55:01 +0000 Subject: [PATCH 1/2] Fixes #186 (cherry picked from commit c6a769f8f2b5ec19fb6150dc5e73c8a8e756abe3) --- src/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc.py b/src/misc.py index 40ac615..f241806 100644 --- a/src/misc.py +++ b/src/misc.py @@ -107,7 +107,7 @@ def weighted_average(value, weight, new_value): def link_formatter(link): """Formats a link to not embed it""" - return "<" + quote(link.replace(" ", "_"), "/:?") + ">" + return "<" + quote(link.replace(" ", "_"), "/:?=&") + ">" def escape_formatting(data): From 9708281a38db8856ec9c2ce660d08f9858f82e4a Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 6 Dec 2020 11:01:59 +0100 Subject: [PATCH 2/2] Fixes discussion formatter as per https://gitlab.com/chicken-riders/RcGcDb/-/commit/5aab6222f91e49d28527d7065778bf242cb577d4 --- src/discussion_formatters.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/discussion_formatters.py b/src/discussion_formatters.py index 13fb6d4..33b7658 100644 --- a/src/discussion_formatters.py +++ b/src/discussion_formatters.py @@ -52,6 +52,7 @@ def compact_formatter(post_type, post, article_paths): elif post_type == "ARTICLE_COMMENT": if article_paths is None: article_paths = {"title": _("unknown"), "fullUrl": settings["fandom_discussions"]["wiki_url"]} # No page known + article_paths["fullUrl"] = article_paths["fullUrl"].replace(")", "\)").replace("()", "\(") if not post["isReply"]: message = "🗒️ "+_( "[{author}]({author_url}) created a [comment](<{url}?commentId={commentId}>) on [{article}](<{url}>)").format(