LibWeb: Use href content attribute value in follow_the_hyperlink()

Previously we were using the IDL attribute value, which didn't follow
the specification.
This commit is contained in:
Tim Ledbetter
2026-01-12 18:46:35 +00:00
committed by Jelle Raaijmakers
parent 0448731059
commit cf3a49cda6
Notes: github-actions[bot] 2026-01-13 09:07:08 +00:00

View File

@@ -496,7 +496,7 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<String> hyperlink_
target_attribute_value = hyperlink_element_utils_get_an_elements_target();
// 4. Let urlRecord be the result of encoding-parsing a URL given subject's href attribute value, relative to subject's node document.
auto url_record = element.document().encoding_parse_url(href());
auto url_record = element.document().encoding_parse_url(element.get_attribute_value(HTML::AttributeNames::href));
// 5. If urlRecord is failure, then return.
if (!url_record.has_value())