pengrad / java-telegram-bot-api

Telegram Bot API for Java

Home Page:https://core.telegram.org/bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Escape characters when using MarkdownV2

butvinm opened this issue · comments

Some characters in the message text should be escaped when using the MarkdownV2 parse mode; otherwise, an error occurs.

You can refer to the docs for more information.

I argue that the text given as input to the library should already be sanitized, otherwise the library cannot know reliably if the character is an intended Markdown symbol or not.

Ok, I understand implementation troubles, but manual escaping still looks very error-prone and inconvenient.

I can contribute markdown utils, such as aiogram provides, if you consider that essential.