Skip to content

Conversation

ErikPelli
Copy link
Contributor

I have created this function that, according to Telegram parse mode, escape the formatting special symbols.
For example, if you have to reply with the user's name, in a MarkdownV2 message, with this function you are sure that the special characters that may be contained in the name are escaped, and the message will be shipped correctly.

Copy link
Member

@Syfaro Syfaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I could definitely see this being useful, I've run into escaping issues before.

I have a few requests before it can be merged though. It would also be great if you could add some tests, although I won't require any.

Copy link
Member

@Syfaro Syfaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@Syfaro Syfaro merged commit 54104a0 into go-telegram-bot-api:master Nov 7, 2020
TheRTK pushed a commit to TheRTK/telegram-bot-api that referenced this pull request Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants