diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-07-30 23:15:51 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-07-30 23:15:51 +0000 |
commit | 548bcad3fa31c55c33200c3516a5a537ca5e3f0d (patch) | |
tree | 1c5cd7bfe77ed80f35517eb3b2f4e3b98030aef7 /protocols/FacebookRM/src/chat.cpp | |
parent | 3e7ef2c033af2cc511f83a8f154f129394f3832b (diff) |
Facebook: Fix sending and receiving % in chats
git-svn-id: http://svn.miranda-ng.org/main/trunk@10001 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/chat.cpp')
-rw-r--r-- | protocols/FacebookRM/src/chat.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 872485107e..82f5368c62 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -26,9 +26,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void FacebookProto::UpdateChat(const TCHAR *tchat_id, const char *id, const char *name, const char *message, DWORD timestamp)
{
+ // replace % to %% to not interfere with chat color codes
+ std::string smessage = message;
+ utils::text::replace_all(&smessage, "%", "%%");
+
ptrT tid( mir_a2t(id));
ptrT tnick( mir_a2t_cp(name,CP_UTF8));
- ptrT ttext( mir_a2t_cp(message,CP_UTF8));
+ ptrT ttext( mir_a2t_cp(smessage.c_str(),CP_UTF8));
GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_MESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
|