main.py: added temporary fix for MarkdownV2 support
This commit is contained in:
parent
87424c8786
commit
1504e03e13
8
main.py
8
main.py
|
@ -192,11 +192,9 @@ def queue_processor():
|
|||
|
||||
if response:
|
||||
# protecting output
|
||||
response = response.replace("(", "\\(")
|
||||
response = response.replace(")", "\\)")
|
||||
response = response.replace("!", "\\!")
|
||||
response = response.replace(".", "\\.")
|
||||
response = response.replace("=", "\\=")
|
||||
symbols_to_escape = ['[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!']
|
||||
for symbol in symbols_to_escape:
|
||||
response = response.replace(symbol, f"\\{symbol}")
|
||||
|
||||
updater.bot.send_message(chat_id=msg.chat.id, text=response,
|
||||
disable_web_page_preview=True,
|
||||
|
|
Loading…
Reference in New Issue