From 7b9379b5c58924ad00b2b1dd0ccf93cd6511e743 Mon Sep 17 00:00:00 2001 From: zevaryx Date: Mon, 29 Aug 2022 01:23:42 +0000 Subject: [PATCH] Unescape HTML, closes jarvis#159 --- jarvis_tasks/tasks/twitter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jarvis_tasks/tasks/twitter.py b/jarvis_tasks/tasks/twitter.py index 5b72a47..4eed3cf 100644 --- a/jarvis_tasks/tasks/twitter.py +++ b/jarvis_tasks/tasks/twitter.py @@ -2,6 +2,7 @@ import logging from asyncio import sleep from datetime import datetime, timedelta, timezone +from html import unescape from typing import List import tweepy.asynchronous @@ -50,6 +51,8 @@ def tweet_embeds(tweet: Status) -> List[Embed]: if item["type"] in ["photo", "animated_gif"]: photos.append(item["media_url_https"]) + text = unescape(text) + base_embed = build_embed( title="", description=(text + f"\n\n[View this tweet]({url})"),