mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
AK: Use base URL when the specified URL is empty
This commit is contained in:
parent
96d3d3b0fe
commit
401bc13776
2 changed files with 10 additions and 1 deletions
|
@ -201,7 +201,7 @@ URL URLParser::parse(StringView raw_input, URL const* base_url, Optional<URL> ur
|
|||
{
|
||||
dbgln_if(URL_PARSER_DEBUG, "URLParser::parse: Parsing '{}'", raw_input);
|
||||
if (raw_input.is_empty())
|
||||
return {};
|
||||
return base_url ? *base_url : URL {};
|
||||
|
||||
if (raw_input.starts_with("data:"sv)) {
|
||||
auto maybe_url = parse_data_url(raw_input);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue