mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/HTML: Explicitly basic parse URL when following the hyperlink
Instead of relying on the implicit URL constuctor. Parsing should never fail here as urlString before adding the suffix is already parsed above, and the suffix should only be a valid query string.
This commit is contained in:
parent
2827374edc
commit
1257d0c1a8
|
|
@ -518,7 +518,9 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<String> hyperlink_
|
|||
// FIXME: 12. If subject's link types includes the noreferrer keyword, then set referrerPolicy to "no-referrer".
|
||||
|
||||
// 13. Navigate targetNavigable to urlString using subject's node document, with referrerPolicy set to referrerPolicy and userInvolvement set to userInvolvement.
|
||||
MUST(target_navigable->navigate({ .url = url_string, .source_document = hyperlink_element_utils_document(), .referrer_policy = referrer_policy, .user_involvement = user_involvement }));
|
||||
auto url = URL::Parser::basic_parse(url_string);
|
||||
VERIFY(url.has_value());
|
||||
MUST(target_navigable->navigate({ .url = url.release_value(), .source_document = hyperlink_element_utils_document(), .referrer_policy = referrer_policy, .user_involvement = user_involvement }));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user