2
0
mirror of https://github.com/ars3niy/tdlib-purple synced 2025-08-31 05:55:08 +00:00

Remove formatting tags from outgoing messages

This commit is contained in:
Arseniy Lartsev
2020-08-18 22:41:02 +02:00
parent 3a1774c0a0
commit 3662536fa5
3 changed files with 17 additions and 3 deletions

View File

@@ -810,7 +810,9 @@ static void appendText(std::vector<MessagePart> &parts, const char *s, size_t le
parts.emplace_back();
std::string sourceText(s, len);
char *newText = purple_unescape_html(sourceText.c_str());
char *halfNewText = purple_markup_strip_html(sourceText.c_str());
char *newText = purple_unescape_html(halfNewText);
g_free(halfNewText);
const char *remaining = newText;
size_t lenRemaining = strlen(newText);