Skip to content

Commit

Permalink
fix: add missing underscore escape
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamer92000 committed Mar 30, 2024
1 parent 9a2686e commit f6836a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bbcode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static void findAndReplaceAll(std::string& str, const std::string& from, const s
static std::string telegramEscape(const char *message) {
std::string msg = std::string(message);
// removed from escape: [, ], `, _, *
auto escapeChars = { '(', ')', '~', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' };
auto escapeChars = { '(', ')', '~', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!', '_' };
for (auto c : escapeChars) {
findAndReplaceAll(msg, std::string(1, c), std::string(1, '\\') + c);
}
Expand Down

0 comments on commit f6836a3

Please sign in to comment.