From 7f90670f1cfdc1974846c351cc05ee3c22990501 Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Sun, 28 Apr 2024 01:01:59 +0800 Subject: [PATCH] fix edit message html escape --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f0de453..d075599 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import html from functools import wraps from aiohttp import ClientSession @@ -95,7 +96,7 @@ async def edit_message(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No ) + update_text[match[1]:] message_to_send = context.user_data['message_to_send'] await message_to_send[0].edit_caption( - update_text, + html.escape(update_text), reply_markup=InlineKeyboardMarkup.from_button( InlineKeyboardButton("↩️ Confirm", callback_data="forward") )