mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Merge branch 'cherry-pick-c6a769f8' into 'master'
Fixes #186 Closes #186 See merge request piotrex43/RcGcDw!82
This commit is contained in:
commit
3ca57488b0
|
@ -52,6 +52,7 @@ def compact_formatter(post_type, post, article_paths):
|
||||||
elif post_type == "ARTICLE_COMMENT":
|
elif post_type == "ARTICLE_COMMENT":
|
||||||
if article_paths is None:
|
if article_paths is None:
|
||||||
article_paths = {"title": _("unknown"), "fullUrl": settings["fandom_discussions"]["wiki_url"]} # No page known
|
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"]:
|
if not post["isReply"]:
|
||||||
message = "🗒️ "+_(
|
message = "🗒️ "+_(
|
||||||
"[{author}]({author_url}) created a [comment](<{url}?commentId={commentId}>) on [{article}](<{url}>)").format(
|
"[{author}]({author_url}) created a [comment](<{url}?commentId={commentId}>) on [{article}](<{url}>)").format(
|
||||||
|
|
|
@ -107,7 +107,7 @@ def weighted_average(value, weight, new_value):
|
||||||
|
|
||||||
def link_formatter(link):
|
def link_formatter(link):
|
||||||
"""Formats a link to not embed it"""
|
"""Formats a link to not embed it"""
|
||||||
return "<" + quote(link.replace(" ", "_"), "/:?") + ">"
|
return "<" + quote(link.replace(" ", "_"), "/:?=&") + ">"
|
||||||
|
|
||||||
|
|
||||||
def escape_formatting(data):
|
def escape_formatting(data):
|
||||||
|
|
Loading…
Reference in a new issue