fix freesound URL parameter escape

git-svn-id: svn://localhost/ardour2/branches/3.0@13698 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Robin Gareus 2012-12-21 13:44:53 +00:00
parent 57bcb2182f
commit cea21cab7e
1 changed files with 9 additions and 4 deletions

View File

@ -211,11 +211,16 @@ std::string Mootcher::searchText(std::string query, int page, std::string filter
snprintf(buf, 23, "p=%d&", page);
params += buf;
}
params += "q=" + query;
if (filter != "")
params += "&f=" + filter;
char *eq = curl_easy_escape(curl, query.c_str(), query.length());
params += "q=" + std::string(eq);
free(eq);
if (filter != "") {
char *ef = curl_easy_escape(curl, filter.c_str(), filter.length());
params += "&f=" + std::string(ef);
free(ef);
}
if (sort)
params += "&s=" + sortMethodString(sort);