@@ -2742,73 +2742,33 @@ <h3><dfn>Writing or pushing content</dfn></h3>
2742
2742
</ p >
2743
2743
< ol class =algorithm id ="validate-external-type ">
2744
2744
< li >
2745
- If |input:string| is not an [=ASCII string=] or it is empty, or its
2745
+ If |input:string| is not an [=ASCII string=], is empty, or its
2746
2746
length exceeds 255 bytes, return `false`.
2747
2747
</ li >
2748
2748
< li >
2749
- If input starts with `U+005B` (`[`), then:
2750
- < ol >
2751
- < li >
2752
- Let |address| be the part of input between `U+005B` (`[`) and
2753
- the first occurrence of `U+005D` (`]`) or `null` if that is not
2754
- found.
2755
- </ li >
2756
- < li >
2757
- If |address| is `null`, return `false`.
2758
- </ li >
2759
- < li >
2760
- Let |domain| be the result of running
2761
- < a href ="https://url.spec.whatwg.org/#concept-ipv6-parser ">
2762
- IPv6 parsing</ a > on |address|.
2763
- </ li >
2764
- < li >
2765
- If |domain| is failure, return `false`.
2766
- </ li >
2767
- < li >
2768
- Let |rest| be the |input| after the first occurrence, if any, of
2769
- `U+005D` (`]`) up to the end of |input|, or `null` if that is
2770
- not found.
2771
- </ li >
2772
- < li >
2773
- If |rest| is `null`, or it contains less than 2 [=code points=],
2774
- or the first [=code point=] in |rest| is not `U+003A` (`:`),
2775
- return `false`.
2776
- </ li >
2777
- < li >
2778
- Let |type| be |rest| from the second [=code point=] up to the end
2779
- of |rest|.
2780
- </ li >
2781
- </ ol >
2749
+ Let |domain| be the |input| from the start of |input| up to
2750
+ but excluding the first occurrence of `U+003A` (`:`), or `null`
2751
+ if that is not found.
2782
2752
</ li >
2783
2753
< li >
2784
- Otherwise,
2785
- < ol >
2786
- < li >
2787
- Let |domain| be the |input| from the start of |input| up to
2788
- but excluding the first occurrence of `U+003A` (`:`), or `null`
2789
- if that is not found.
2790
- </ li >
2791
- < li >
2792
- Let |type| be the |input| after the first occurrence, if any, of
2793
- `U+003A` (`:`) up to the end of |input|, or `null` if that is
2794
- not found.
2795
- </ li >
2796
- < li >
2797
- If |domain| or |type| is `null`, return `false`.
2798
- </ li >
2799
- < li >
2800
- Let |asciiDomain| be the result of running
2801
- < a href ="https://url.spec.whatwg.org/#concept-domain-to-ascii ">
2802
- domain to ASCII</ a > given |domain| and `true` (as |beStrict|).
2803
- </ li >
2804
- < li >
2805
- If |asciiDomain| is failure, return `false`.
2806
- </ li >
2807
- < li >
2808
- If |asciiDomain| contains a [=forbidden host code point=] or
2809
- `U+005F` `LOW LINE` (`_`), return `false`.
2810
- </ li >
2811
- </ ol >
2754
+ Let |type| be the |input| after the first occurrence, if any, of
2755
+ `U+003A` (`:`) up to the end of |input|, or `null` if that is
2756
+ not found.
2757
+ </ li >
2758
+ < li >
2759
+ If |domain| or |type| is `null`, return `false`.
2760
+ </ li >
2761
+ < li >
2762
+ Let |asciiDomain| be the result of running
2763
+ < a href ="https://url.spec.whatwg.org/#concept-domain-to-ascii ">
2764
+ domain to ASCII</ a > given |domain| and `true` (as |beStrict|).
2765
+ </ li >
2766
+ < li >
2767
+ If |asciiDomain| is failure, return `false`.
2768
+ </ li >
2769
+ < li >
2770
+ If |asciiDomain| contains a [=forbidden host code point=] or
2771
+ `U+005F` `LOW LINE` (`_`), return `false`.
2812
2772
</ li >
2813
2773
< li >
2814
2774
If |type| contains [=code points=] that are not
0 commit comments