diff --git a/okapi.cpp b/okapi.cpp index 29f3c29..dd2c61e 100644 --- a/okapi.cpp +++ b/okapi.cpp @@ -253,7 +253,9 @@ void Okapi::update_caches(Caches& cc) const { std::string Okapi::get_uuid(const std::string& username) const { std::string service = url + OKAPI_username; - std::string query = "consumer_key=" + key + "&username=" + username + "&fields=uuid"; + char* user_esc = curl_easy_escape(curl, username.c_str(), username.size()) ; + std::string query = "consumer_key=" + key + "&username=" + user_esc + "&fields=uuid"; + curl_free(user_esc); curl_post(service, query); json j = json::parse(curl_output); return j["uuid"];