summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_freesound_mootcher.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-12-21 13:44:53 +0000
committerRobin Gareus <robin@gareus.org>2012-12-21 13:44:53 +0000
commitcea21cab7e1b80ec5784ca71035d5f1b796ebb61 (patch)
treec3b8769b5b9d81f22aadd9ea1d3ca0ee9169f4e8 /gtk2_ardour/sfdb_freesound_mootcher.cc
parent57bcb2182fa44ffb04f7b255a5676ef4af879b42 (diff)
fix freesound URL parameter escape
git-svn-id: svn://localhost/ardour2/branches/3.0@13698 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/sfdb_freesound_mootcher.cc')
-rw-r--r--gtk2_ardour/sfdb_freesound_mootcher.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc
index a1cb4a969e..ed4fd617a9 100644
--- a/gtk2_ardour/sfdb_freesound_mootcher.cc
+++ b/gtk2_ardour/sfdb_freesound_mootcher.cc
@@ -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);