mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Use correct URL parsing methods throughout LibWeb
There are essentially 3 URL parsing AOs defined by the spec: 1. Parse a URL 2. Encoding parse a URL 3. Encoding parse a URL and serialize the result Further, these are replicated between the Document and the ESO. This patch defines these methods in accordance with the spec and updates existing users to invoke the correct method. In places where the correct method is ambiguous, we use the encoding parser to preserve existing ad- hoc behavior.
This commit is contained in:
@@ -222,7 +222,7 @@ WebIDL::ExceptionOr<void> HTMLFormElement::submit_form(GC::Ref<HTMLElement> subm
|
||||
|
||||
// 14. Parse a URL given action, relative to the submitter element's node document. If this fails, return.
|
||||
// 15. Let parsed action be the resulting URL record.
|
||||
auto parsed_action = document().parse_url(action);
|
||||
auto parsed_action = submitter->document().parse_url(action);
|
||||
if (!parsed_action.is_valid()) {
|
||||
dbgln("Failed to submit form: Invalid URL: {}", action);
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user