diff --git a/url.bs b/url.bs index 88845f18..9d4ebf41 100644 --- a/url.bs +++ b/url.bs @@ -809,9 +809,8 @@ It is initially the empty string.

A URL's username is an ASCII string identifying a user. It is initially the empty string. -

A URL's password is -either null or an ASCII string identifying a user's credentials. It is initially -null. +

A URL's password is an +ASCII string identifying a user's credentials. It is initially the empty string.

A URL's host is either null or a host. It is initially null. @@ -895,10 +894,10 @@ Referrer Policy. [[FETCH]] [[REFERRER-POLICY]]

HTTP(S) scheme, network scheme, and fetch scheme are used by HTML. [[HTML]] -

A URL includes credentials if either -its username is not the empty string or its password is -non-null. - +

A URL +includes credentials if its +username or password is not the empty string. +

A URL can be designated as base URL. @@ -1240,7 +1239,7 @@ string input, optionally with a base URL base, opti

  • Let buffer be the empty string. -

  • Let the @ flag and the [] flag be +

  • Let the @ flag, [] flag, and passwordTokenSeenFlag be unset.

  • Let pointer be a pointer to first code point in @@ -1513,18 +1512,16 @@ string input, optionally with a base URL base, opti

    For each codePoint in buffer, run these substeps:

      -
    1. If codePoint is ":" and - url's - password is null, set - url's password - to the empty string and run these substeps for the next code point. +

    2. If codePoint is ":" and passwordTokenSeenFlag is + unset, then set passwordTokenSeenFlag and run these substeps for the next code + point.

    3. Let encodedCodePoints be the result of running UTF-8 percent encode codePoint using the userinfo encode set. -

    4. If url's password is non-null, append - encodedCodePoints to url's password. +

    5. If passwordTokenSeenFlag is set, then append encodedCodePoints + to url's password.

    6. Otherwise, append encodedCodePoints to url's username. @@ -2034,19 +2031,10 @@ string input, optionally with a base URL base, opti password, run these steps:

        -
      1. If password is the empty string, set url's - password to null. +

      2. Set url's password to the empty string. -

      3. -

        Otherwise, run these substeps: - -

          -
        1. Set url's password to the empty string. - -

        2. For each code point in password, - UTF-8 percent encode it using the userinfo encode set, and - append the result to url's password. -

        +
      4. For each code point in password, UTF-8 percent encode it using the + userinfo encode set, and append the result to url's password.

      @@ -2067,16 +2055,14 @@ then runs these steps:
    7. Append "//" to output.

    8. -

      If url's username is not the empty string - or url's password is non-null, run these substeps: +

      If url includes credentials, then:

      1. Append url's username to output. -

      2. If url's password is non-null, append - ":", followed by url's password, to - output. +

      3. If url's password is not the empty string, then append + ":", followed by url's password, to output.

      4. Append "@" to output.

      @@ -2581,14 +2567,8 @@ compatibility with HTML's MessageEvent feature. [[!HTML]] given value.
    -

    The password attribute's getter must run these steps: - -

      -
    1. If context object's url's password is null, return the - empty string. - -

    2. Return context object's url's password. -

    +

    The password attribute's getter must return +context object's url's password.

    The password attribute's setter must run these steps: @@ -2974,6 +2954,7 @@ Santiago M. Mola, Sebastian Mayr, Simon Pieters, Simon Sapin, +Steven Vachon, Stuart Cook, Sven Uhlig, Tab Atkins,