From 9b0cb59af4ed53c7670e37ad525205651ab12cd6 Mon Sep 17 00:00:00 2001 From: Frisk Date: Wed, 26 Dec 2018 14:21:05 +0100 Subject: [PATCH] Escape Discord characters in edit summary --- rcgcdw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index b1f9d55..48229c5 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -481,7 +481,7 @@ def webhook_formatter(action, STATIC, **params): embed["url"] = link if "desc" not in params: params["desc"] = "" - embed["description"] = params["desc"] + embed["description"] = re.sub(r"(`|_|\*|~|<|>|{|})", "\\\\\\1", params["desc"], 0) embed["color"] = random.randrange(1, 16777215) if colornumber is None else math.floor(colornumber) embed["timestamp"] = STATIC["timestamp"] if STATIC["tags"]: