Escape HTML characters.
This commit is contained in:
+2
-4
@@ -23,15 +23,13 @@ def send_quote(after_sec, message, quote):
|
|||||||
) # Reading time is quarter of the same text writing time
|
) # Reading time is quarter of the same text writing time
|
||||||
bot.send_chat_action(message.chat.id, action="typing")
|
bot.send_chat_action(message.chat.id, action="typing")
|
||||||
sleep(after_sec) # Typing time
|
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):
|
def act(message: types.Message):
|
||||||
quote = speak(50, message.chat.id)
|
quote = speak(50, message.chat.id)
|
||||||
if quote:
|
if quote:
|
||||||
threading.Thread(
|
threading.Thread(target=send_quote, args=(len(quote) * 0.13, message, quote)).start()
|
||||||
target=send_quote, args=(len(quote) * 0.13, message, quote)
|
|
||||||
).start()
|
|
||||||
|
|
||||||
|
|
||||||
@bot.message_handler(func=is_white, commands=["add"])
|
@bot.message_handler(func=is_white, commands=["add"])
|
||||||
|
|||||||
Reference in New Issue
Block a user