diff --git a/lib/libimhex/include/hex/helpers/http_requests.hpp b/lib/libimhex/include/hex/helpers/http_requests.hpp index 6f220e23e..01b5591af 100644 --- a/lib/libimhex/include/hex/helpers/http_requests.hpp +++ b/lib/libimhex/include/hex/helpers/http_requests.hpp @@ -118,9 +118,9 @@ namespace hex { template std::future> execute(); - std::string urlEncode(const std::string &input); + static std::string urlEncode(const std::string &input); - std::string urlDecode(const std::string &input); + static std::string urlDecode(const std::string &input); protected: void setDefaultConfig(); diff --git a/lib/libimhex/source/helpers/http_requests.cpp b/lib/libimhex/source/helpers/http_requests.cpp index e6681b515..5c53030c3 100644 --- a/lib/libimhex/source/helpers/http_requests.cpp +++ b/lib/libimhex/source/helpers/http_requests.cpp @@ -51,7 +51,7 @@ namespace hex { i += 2; } } - return input; + return result; } } \ No newline at end of file diff --git a/plugins/builtin/source/content/tools/wiki_explainer.cpp b/plugins/builtin/source/content/tools/wiki_explainer.cpp index 5e7501a08..44f0cfb94 100644 --- a/plugins/builtin/source/content/tools/wiki_explainer.cpp +++ b/plugins/builtin/source/content/tools/wiki_explainer.cpp @@ -39,7 +39,7 @@ namespace hex::plugin::builtin { ImGui::EndDisabled(); if (startSearch && !searchString.empty()) { - request.setUrl(getWikipediaApiUrl() + "&exintro"s + "&titles="s + request.urlEncode(searchString)); + request.setUrl(getWikipediaApiUrl() + "&exintro"s + "&titles="s + HttpRequest::urlEncode(searchString)); searchProcess = request.execute(); } @@ -66,7 +66,7 @@ namespace hex::plugin::builtin { if (!extendedSearch && resultExtract.ends_with(':')) { extendedSearch = true; - request.setUrl(getWikipediaApiUrl() + "&titles="s + request.urlEncode(searchString)); + request.setUrl(getWikipediaApiUrl() + "&titles="s + HttpRequest::urlEncode(searchString)); searchProcess = request.execute(); resultTitle.clear();