From acbcafdf004974062698187f33de7fefbd177e6c Mon Sep 17 00:00:00 2001 From: Anne van Kesteren <annevk@annevk.nl> Date: Mon, 2 Dec 2024 10:32:37 +0100 Subject: [PATCH 1/2] Editorial: only care about the empty string when beStrict is false VerifyDnsLength will take care of it otherwise. (See #497 for additional context.) --- url.bs | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/url.bs b/url.bs index b7471a4..72b571e 100644 --- a/url.bs +++ b/url.bs @@ -917,19 +917,24 @@ concepts. <li><p>If <var>result</var> is a failure value, <a>domain-to-ASCII</a> <a>validation error</a>, return failure. - <li><p>If <var>result</var> is the empty string, <a>domain-to-ASCII</a> <a>validation error</a>, - return failure. - <li> - <p>If <var>beStrict</var> is false and <var>result</var> contains a - <a>forbidden domain code point</a>, <a>domain-invalid-code-point</a> <a>validation error</a>, - return failure. + <p>If <var>beStrict</var> is false: + + <ol> + <li><p>If <var>result</var> is the empty string, <a>domain-to-ASCII</a> <a>validation error</a>, + return failure. + + <li> + <p>If <var>result</var> contains a <a>forbidden domain code point</a>, + <a>domain-invalid-code-point</a> <a>validation error</a>, return failure. - <p class=note>Due to web compatibility and compatibility with non-DNS-based systems the - <a>forbidden domain code points</a> are a subset of those disallowed when <i>UseSTD3ASCIIRules</i> - is true. See also <a href="https://github.com/whatwg/url/issues/397">issue #397</a>. + <p class=note>Due to web compatibility and compatibility with non-DNS-based systems the + <a>forbidden domain code points</a> are a subset of those disallowed when + <i>UseSTD3ASCIIRules</i> is true. See also + <a href="https://github.com/whatwg/url/issues/397">issue #397</a>. + </ol> - <li><p><a for=/>Assert</a>: <var>result</var> does not contain a + <li><p><a for=/>Assert</a>: <var>result</var> is not the empty string and does not contain a <a>forbidden domain code point</a>. <li><p>Return <var>result</var>. From d4110e014b983cff1a193bc4e32a8243ee3df936 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren <annevk@annevk.nl> Date: Mon, 2 Dec 2024 17:08:06 +0100 Subject: [PATCH 2/2] Update url.bs --- url.bs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/url.bs b/url.bs index 72b571e..25622de 100644 --- a/url.bs +++ b/url.bs @@ -934,8 +934,12 @@ concepts. <a href="https://github.com/whatwg/url/issues/397">issue #397</a>. </ol> - <li><p><a for=/>Assert</a>: <var>result</var> is not the empty string and does not contain a - <a>forbidden domain code point</a>. + <li> + <p><a for=/>Assert</a>: <var>result</var> is not the empty string and does not contain a + <a>forbidden domain code point</a>. + + <p class=note><cite>Unicode IDNA Compatibility Processing</cite> guarantees this holds when + <var>beStrict</var> is true. [[UTS46]] <li><p>Return <var>result</var>. </ol>