Skip to content

Commit 3a80353

Browse files
Stop using “strictly split” in “validate and extract”
This change causes the “validate and extract” algorithm to stop calling “strictly split” and instead split on the first colon only. Given the qualified name “foo:bar:baz”, that produces the local name “bar:baz”. Otherwise, without this change, using “strictly split” produces the prefix “foo” and local name “bar" — discarding the “:baz” part. Tests: web-platform-tests/wpt#58331. Additional context: WICG/sanitizer-api#373. Fixes #1453.
1 parent 73de9e5 commit 3a80353

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

dom.bs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,9 @@ U+0000 NULL, or U+003E (>).
254254
<p>If <var>qualifiedName</var> contains a U+003A (:):
255255

256256
<ol>
257-
<li><p>Let <var>splitResult</var> be the result of running <a>strictly split</a> given
258-
<var>qualifiedName</var> and U+003A (:).
257+
<li><p>Set <var>prefix</var> to the part of <var>qualifiedName</var> before the first U+003A (:).
259258

260-
<li><p>Set <var>prefix</var> to <var>splitResult</var>[0].
261-
262-
<li><p>Set <var>localName</var> to <var>splitResult</var>[1].
259+
<li><p>Set <var>localName</var> to the part of <var>qualifiedName</var> after the first U+003A (:).
263260

264261
<li><p>If <var>prefix</var> is not a [=valid namespace prefix=], then [=throw=] an
265262
"{{InvalidCharacterError}}" {{DOMException}}.

0 commit comments

Comments
 (0)