From 176b7bd56e4b758809149526a54da5516c26db8d Mon Sep 17 00:00:00 2001 From: Rykov7 Date: Fri, 14 Jul 2023 09:45:16 +0300 Subject: [PATCH] Escape HTML characters when sending quotes --- app/stan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/stan.py b/app/stan.py index 78854a5..dfc9a57 100644 --- a/app/stan.py +++ b/app/stan.py @@ -1,4 +1,5 @@ """ Stan's commands and reactions. """ +import html import random import threading from time import sleep @@ -22,7 +23,7 @@ def send_quote(after_sec, message, quote): ) # Reading time is quarter of the same text writing time bot.send_chat_action(message.chat.id, action="typing") sleep(after_sec) # Typing time - bot.send_message(message.chat.id, quote) + bot.send_message(message.chat.id, html.escape(quote)) def act(message: types.Message):