mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Make DOM::validate_and_extract() preserve entire local name
Change local-name computation in DOM::validate_and_extract() to preserve everything after the first colon in a qualified name — matching a recent spec change made in https://github.com/whatwg/dom/pull/1455 (and replacing a previous spec requirement to use the “strictly split” algorithm, which resulted in throwing away any other part of the name after any second colon the name might have). For the qualified name “f:o:o”, this change now gives localName=“o:o”. Otherwise, without this change, it’d instead give localName=“o”.
This commit is contained in:
committed by
Shannon Booth
parent
2e930e83ce
commit
7adadedf52
Notes:
github-actions[bot]
2026-03-10 09:39:00 +00:00
Author: https://github.com/sideshowbarker Commit: https://github.com/LadybirdBrowser/ladybird/commit/7adadedf523 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8345 Reviewed-by: https://github.com/shannonbooth ✅
@@ -116,7 +116,7 @@ test(function() {
|
||||
var names = []
|
||||
var firstColonIndex = qualified.indexOf(":")
|
||||
if (firstColonIndex >= 0) {
|
||||
names = qualifiedName.split(":", 2);
|
||||
names = [qualified.substring(0, firstColonIndex), qualified.substring(firstColonIndex + 1)];
|
||||
} else {
|
||||
names = [null, qualified]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user