summaryrefslogtreecommitdiff
path: root/AK/URL.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-09-13 22:34:14 +0300
committerAndreas Kling <kling@serenityos.org>2021-09-14 00:14:45 +0200
commit55b67ba7a70f038d0796b0dbf3143dfeab91ae28 (patch)
treea1c32b6eaf8d4c1828ee5adb23db988a956e59da /AK/URL.cpp
parent6fa4fc8353d79bebfdbfba0fc4eae22cb5935705 (diff)
downloadserenity-55b67ba7a70f038d0796b0dbf3143dfeab91ae28.zip
AK: Accept optional url and state override parameters in URLParser
These are required in the specification and used by the web's URL built-in, this commit also removes the Badge<AK::URL> from URLParser to allow other classes that need to call the parser directly like the web's URL built-in to do so.
Diffstat (limited to 'AK/URL.cpp')
-rw-r--r--AK/URL.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/URL.cpp b/AK/URL.cpp
index 66fbecb520..01f3fe3114 100644
--- a/AK/URL.cpp
+++ b/AK/URL.cpp
@@ -17,7 +17,7 @@ namespace AK {
// FIXME: It could make sense to force users of URL to use URLParser::parse() explicitly instead of using a constructor.
URL::URL(StringView const& string)
- : URL(URLParser::parse({}, string))
+ : URL(URLParser::parse(string))
{
if constexpr (URL_PARSER_DEBUG) {
if (m_valid)
@@ -44,7 +44,7 @@ URL URL::complete_url(String const& string) const
if (!is_valid())
return {};
- return URLParser::parse({}, string, this);
+ return URLParser::parse(string, this);
}
void URL::set_scheme(String scheme)