fix: URL Decoding not working correctly
This commit is contained in:
parent
4a44cddcea
commit
3bd779a607
@ -118,9 +118,9 @@ namespace hex {
|
|||||||
template<typename T = std::string>
|
template<typename T = std::string>
|
||||||
std::future<Result<T>> execute();
|
std::future<Result<T>> 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:
|
protected:
|
||||||
void setDefaultConfig();
|
void setDefaultConfig();
|
||||||
|
@ -51,7 +51,7 @@ namespace hex {
|
|||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return input;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -39,7 +39,7 @@ namespace hex::plugin::builtin {
|
|||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
|
|
||||||
if (startSearch && !searchString.empty()) {
|
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();
|
searchProcess = request.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ namespace hex::plugin::builtin {
|
|||||||
if (!extendedSearch && resultExtract.ends_with(':')) {
|
if (!extendedSearch && resultExtract.ends_with(':')) {
|
||||||
extendedSearch = true;
|
extendedSearch = true;
|
||||||
|
|
||||||
request.setUrl(getWikipediaApiUrl() + "&titles="s + request.urlEncode(searchString));
|
request.setUrl(getWikipediaApiUrl() + "&titles="s + HttpRequest::urlEncode(searchString));
|
||||||
searchProcess = request.execute();
|
searchProcess = request.execute();
|
||||||
|
|
||||||
resultTitle.clear();
|
resultTitle.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user