Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #42721 Escape all special characters for parse_mode MARKDOWN_V2 (…
…thomas2411) This PR was submitted for the 5.4 branch but it was squashed and merged into the 5.3 branch instead. Discussion ---------- Escape all special characters for parse_mode MARKDOWN_V2 | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #42697 | License | MIT In the documentation of Telegram Bot API https://core.telegram.org/bots/api#markdownv2-style we can see that we need to escape more characters _ * [ ] ( ) ~ ` > # + - = | { } . !. I have prepared a Regex for this and replaced https://github.com/symfony/telegram-notifier/blob/5.3/TelegramTransport.php#L85 I have also changed test used for escaping dot to a test that checks escaping all those characters. Commits ------- 709981b Escape all special characters for parse_mode MARKDOWN_V2
- Loading branch information