From 1ab25705c372fc7436a49723b8db0e59fc0de6c0 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 13 Apr 2015 06:21:10 +0000 Subject: search fix git-svn-id: http://svn.miranda-ng.org/main/trunk@12781 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/requests/search.h | 2 +- protocols/SkypeWeb/src/skype_search.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/SkypeWeb/src/requests/search.h b/protocols/SkypeWeb/src/requests/search.h index c31ceeec75..4628dfdd56 100644 --- a/protocols/SkypeWeb/src/requests/search.h +++ b/protocols/SkypeWeb/src/requests/search.h @@ -22,7 +22,7 @@ class GetSearchRequest : public HttpRequest { public: GetSearchRequest(const char *token, const char *string) : - HttpRequest(REQUEST_GET, FORMAT, "api.skype.com/search/users/any?keyWord=%s&contactTypes[]=skype", ptrA(mir_urlEncode(string))) + HttpRequest(REQUEST_GET, FORMAT, "api.skype.com/search/users/any?keyWord=%s&contactTypes[]=skype", string) { Headers << CHAR_VALUE("Accept", "application/json") diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp index 9db84a6ca2..10d2ccbc88 100644 --- a/protocols/SkypeWeb/src/skype_search.cpp +++ b/protocols/SkypeWeb/src/skype_search.cpp @@ -29,9 +29,8 @@ void CSkypeProto::SearchBasicThread(void* id) if (!IsOnline()) return; ptrA token(getStringA("TokenSecret")); - //need to convert search string - char *string = mir_t2a((TCHAR*)id); - PushRequest(new GetSearchRequest(token, (char*)string), &CSkypeProto::OnSearch); + ptrA string(mir_urlEncode(ptrA(mir_utf8encodeT((TCHAR*)id)))); + PushRequest(new GetSearchRequest(token, string), &CSkypeProto::OnSearch); } void CSkypeProto::OnSearch(const NETLIBHTTPREQUEST *response) -- cgit v1.2.3