diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-06-24 01:07:37 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-11 16:05:23 +0000 |
commit | 146bce53dda9ac2bf2633ba950226bddca9dfa51 (patch) | |
tree | e7bdfa6930281c9b2c086718b19cbe0877b8aedb /Userland | |
parent | a438c4d568ca4e16164b65e408cdcbba587517f8 (diff) | |
download | serenity-146bce53dda9ac2bf2633ba950226bddca9dfa51.zip |
Help: Fix search query parsing
This was failing probably because AK::URL was being too strict; and the
query emptyness check was flipped.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/Help/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index 8c6da96286..3ae157664b 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -19,7 +19,7 @@ using namespace Help; static DeprecatedString parse_input(StringView input) { - AK::URL url(input); + AK::URL url = URL::create_with_url_or_path(input); if (url.is_valid()) return url.basename(); @@ -72,7 +72,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) .accept_value = [&](char const* input_ptr) { StringView input { input_ptr, strlen(input_ptr) }; // If start_page was already set by our section arg, then it can't be set again - if (start_page.is_empty()) + if (!start_page.is_empty()) return false; start_page = parse_input(input); return true; |