From 58827e0b445162ba53bfb9e93dd412b58576b1dd Mon Sep 17 00:00:00 2001 From: StephanAkkerman Date: Tue, 7 Nov 2023 19:41:48 +0100 Subject: [PATCH] Fix reddit posts close #414 --- src/cogs/loops/reddit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cogs/loops/reddit.py b/src/cogs/loops/reddit.py index 9cd13f45..1d205bef 100644 --- a/src/cogs/loops/reddit.py +++ b/src/cogs/loops/reddit.py @@ -1,5 +1,6 @@ # Standard libraries import datetime +import html # > 3rd party dependencies import asyncpraw @@ -109,13 +110,13 @@ async def wsb(self, reddit: asyncpraw.Reddit) -> None: # If it is a new submission add it to the db self.add_id_to_db(submission.id) - descr = submission.selftext + descr = html.unescape(submission.selftext) # Make sure the description and title are not too long if len(descr) > 4000: descr = descr[:4000] + "..." - title = submission.title + title = html.unescape(submission.title) if len(title) > 250: title = title[:250] + "..."