mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-23 21:14:31 +00:00
AK+Everywhere: Change URL::path() to serialize_path()
This now defaults to serializing the path with percent decoded segments (which is what all callers expect), but has an option not to. This fixes `file://` URLs with spaces in their paths. The name has been changed to serialize_path() path to make it more clear that this method will generate a new string each call (except for the cannot_be_a_base_url() case). A few callers have then been updated to avoid repeatedly calling this function.
This commit is contained in:
@@ -480,7 +480,7 @@ void MainWidget::drop_event(GUI::DropEvent& drop_event)
|
||||
if (!scheme.equals_ignoring_ascii_case("file"sv))
|
||||
continue;
|
||||
|
||||
auto lexical_path = LexicalPath(url.path());
|
||||
auto lexical_path = LexicalPath(url.serialize_path());
|
||||
open_script_from_file(lexical_path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user