aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2021-08-27 13:56:26 +0100
committerGravatar wookie184 <[email protected]>2021-08-27 13:56:26 +0100
commitcc5364421c69e8ad533483591cb37b063b7ea5a6 (patch)
tree98b61f7dfc83b8cc8c8ca158c5ba07b95cb7317a
parentMerge pull request #818 from python-discord/int-eval-owner-check (diff)
Escape markdown properly in post body to fix rendering on android
-rw-r--r--bot/exts/evergreen/reddit.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/evergreen/reddit.py b/bot/exts/evergreen/reddit.py
index e57fa2c0..4df170c6 100644
--- a/bot/exts/evergreen/reddit.py
+++ b/bot/exts/evergreen/reddit.py
@@ -79,7 +79,8 @@ class Reddit(Cog):
text = data["selftext"]
if text:
- first_page += textwrap.shorten(text, width=100, placeholder="...").replace("*", "") + "\n"
+ text = escape_markdown(text).replace("[", "⦋").replace("]", "⦌")
+ first_page += textwrap.shorten(text, width=100, placeholder="...") + "\n"
ups = data["ups"]
comments = data["num_comments"]