From e915cd13de3957a7ab32e9e1a243b412c3ca02f1 Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Fri, 26 Apr 2024 15:13:38 +0800 Subject: [PATCH] fix html escape --- tweet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tweet.py b/tweet.py index ec5d54d..f4dcba7 100644 --- a/tweet.py +++ b/tweet.py @@ -1,3 +1,4 @@ +import html from typing import Generator from aiohttp import ClientSession @@ -183,8 +184,8 @@ class TGTweet(Tweet): return message_raw_text.format( url=self.url, author_url=self.author_url, - author=self.author, - text=self.text + author=html.escape(self.author), + text=html.escape(self.text) ) @property