summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-24 22:04:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-24 22:04:25 +0000
commit8f5d084383740f0848c4e181bde90a2aa238d9d1 (patch)
treeb6a27a8e87077cd5f0930faac399cd22250748f9 /plugins/Weather
parent1e13a939b177960b7048b8532205bc369501d399 (diff)
MS_NETLIB_URLENCODE removed from all plugins, but still exists in the core
git-svn-id: http://svn.miranda-ng.org/main/trunk@4181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather_addstn.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index 22cf2b5ddc..fe315a8ad5 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -306,17 +306,12 @@ int IDSearch(TCHAR *sID, const int searchId)
// svcname = the name of the weather service that is currently searching (ie. Yahoo Weather)
int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR *svc, TCHAR *svcname)
{
- char loc[256];
TCHAR Name[MAX_DATA_LEN], str[MAX_DATA_LEN], sID[MAX_DATA_LEN], *szData = NULL, *search;
// replace spaces with %20
- {
- mir_ptr<char> szSearchName( mir_utf8encodeT(name));
- char *pstr = (char*)CallService(MS_NETLIB_URLENCODE, 0, (LPARAM)(char*)szSearchName);
- wsprintfA(loc, sData->SearchURL, pstr);
- HeapFree(GetProcessHeap(), 0, pstr);
- }
-
+ char loc[256];
+ mir_ptr<char> szSearchName( mir_utf8encodeT(name));
+ wsprintfA(loc, sData->SearchURL, mir_ptr<char>( mir_urlEncode(szSearchName)));
if (InternetDownloadFile(loc, NULL, &szData) == 0) {
TCHAR* szInfo = szData;
search = _tcsstr(szInfo, sData->NotFoundStr); // determine if data is available