From da212c98f0bba9c35aec3728bbcc13f8f3a7eb52 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 29 Nov 2024 09:21:08 +0100 Subject: [PATCH] Remove redundant domain to Unicode call from valid domain I'm not entirely sure why this redundant check existed. Either because there was a difference back when this definition was introduced in 3bec3b89c4deb10842ba6c464c700df47c268f17 or (more likely) I wasn't sure if there was a difference. Fixes #817. --- url.bs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/url.bs b/url.bs index 2f475eb..c51d9c0 100644 --- a/url.bs +++ b/url.bs @@ -952,20 +952,13 @@ concepts. valid IPv4-address string, or: U+005B ([), followed by a valid IPv6-address string, followed by U+005D (]). -

A domain is a valid domain if these steps return success: +

A string input is a valid domain if these steps return true:

    -
  1. Let result be the result of running domain to ASCII with domain +

  2. Let domain be the result of running domain to ASCII with input and true. -

  3. If result is failure, then return failure. - -

  4. Set result to the result of running domain to Unicode with - result and true. - -

  5. If result contains any errors, return failure. - -

  6. Return success. +

  7. Return false if domain is failure; otherwise true.

Ideally we define this in terms of a sequence of code points that make up a