summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/utilities.cpp
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2012-10-16 05:19:02 +0000
committerAlexander Gluzsky <sss123next@list.ru>2012-10-16 05:19:02 +0000
commitf49964c318fbf1e41622204e640ba71bf896db0d (patch)
tree753ad8cb15025ae128e26b00bb7f887aea265c61 /plugins/New_GPG/src/utilities.cpp
parent6b27aa506d7b45ce503d0a546cbe9d13746c2be3 (diff)
added some useless overhead (fixed compatibility problem with sefetyjabber client)
git-svn-id: http://svn.miranda-ng.org/main/trunk@1953 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/utilities.cpp')
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 0c13d33e8d..8a503249ec 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -691,7 +691,12 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void *pU
}
p1+=2;
wstring::size_type p2 = data.find(_T("-----END PGP MESSAGE-----"));
- HXML encrypted_data = xi.addChild(node, _T("x"), data.substr(p1, p2-p1).c_str());
+ wstring data2 = data.substr(p1, p2-p1);
+ for(std::wstring::size_type i = data2.find(_T("\r")); i != std::wstring::npos; i = data2.find(_T("\r"), i+1))
+ data2.erase(i, 1);
+ for(std::wstring::size_type i = data2.find(_T("\n")); i != std::wstring::npos; i = data2.find(_T("\n"), i+1))
+ data2.erase(i, 1);
+ HXML encrypted_data = xi.addChild(node, _T("x"), data2.c_str());
xi.addAttr(encrypted_data, _T("xmlns"), _T("jabber:x:encrypted"));
return FALSE;
}