diff options
| -rw-r--r-- | bot/exts/info/reddit.py | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/bot/exts/info/reddit.py b/bot/exts/info/reddit.py index 534917c07..9c026caca 100644 --- a/bot/exts/info/reddit.py +++ b/bot/exts/info/reddit.py @@ -1,10 +1,10 @@  import asyncio -import html  import logging  import random  import textwrap  from collections import namedtuple  from datetime import datetime, timedelta +from html import unescape  from typing import List  from aiohttp import BasicAuth, ClientError @@ -180,7 +180,7 @@ class Reddit(Cog):          for post in posts:              data = post["data"] -            text = html.unescape(data["selftext"]) +            text = unescape(data["selftext"])              if text:                  text = textwrap.shorten(text, width=128, placeholder="...")                  text += "\n"  # Add newline to separate embed info @@ -189,7 +189,7 @@ class Reddit(Cog):              comments = data["num_comments"]              author = data["author"] -            title = html.unescape(data["title"]) +            title = unescape(data["title"])              title = textwrap.shorten(title, width=64, placeholder="...")              # Normal brackets interfere with Markdown.              title = escape_markdown(title).replace("[", "⦋").replace("]", "⦌") | 
