Skip to content

Commit 326c644

Browse files
authored
Build upon URL rather than PSL
Instead of "parsing" the Public Suffix List directly, use new terminology from the URL Standard. Closes #3711.
1 parent 9592eb5 commit 326c644

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

source

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,6 +2660,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
26602660

26612661
<ul class="brief">
26622662
<li><dfn data-x="concept-host" data-x-href="https://url.spec.whatwg.org/#concept-host">host</dfn></li>
2663+
<li><dfn data-x-href="https://url.spec.whatwg.org/#host-public-suffix">public suffix</dfn></li>
26632664
<li><dfn data-x="concept-domain" data-x-href="https://url.spec.whatwg.org/#concept-domain">domain</dfn></li>
26642665
<li><dfn data-x-href="https://url.spec.whatwg.org/#concept-ipv4">IPv4 address</dfn></li>
26652666
<li><dfn data-x-href="https://url.spec.whatwg.org/#concept-ipv6">IPv6 address</dfn></li>
@@ -79672,28 +79673,24 @@ interface <dfn>BarProp</dfn> {
7967279673
<li><p>If <var>host</var> is failure, then return false.</p></li>
7967379674

7967479675
<li>
79675-
<p>If <var>host</var> is <em>not</em> <span data-x="host equals">equal</span> to
79676-
<var>originalHost</var>, then run these substeps:</p>
79676+
<p>If <var>host</var> does not <span data-x="host equals">equal</span> <var>originalHost</var>,
79677+
then:</p>
7967779678

7967879679
<ol>
7967979680
<li>
7968079681
<p>If <var>host</var> or <var>originalHost</var> is not a <span
7968179682
data-x="concept-domain">domain</span>, then return false.</p>
7968279683

79683-
<p class="note">This is meant to exclude <span data-x="concept-host">hosts</span> that are an
79684-
<span>IPv4 address</span> or an <span>IPv6 address</span>.</p>
79684+
<p class="note">This excludes <span data-x="concept-host">hosts</span> that are an <span>IPv4
79685+
address</span> or an <span>IPv6 address</span>.</p>
7968579686
</li>
7968679687

7968779688
<li><p>If <var>host</var>, prefixed by a U+002E FULL STOP (.), does not exactly match the end
7968879689
of <var>originalHost</var>, then return false.</p></li>
79690+
<!-- This seems okay, but does pretend hosts are strings which URL does not. -->
7968979691

79690-
<li>
79691-
<p>If <var>host</var> matches a suffix in the Public Suffix List, or, if <var>host</var>,
79692-
prefixed by a U+002E FULL STOP (.), matches the end of a suffix in the Public Suffix List,
79693-
then return false. <ref spec=PSL></p>
79694-
79695-
<p>Suffixes must be compared after applying the <span>host parser</span> algorithm.</p>
79696-
</li>
79692+
<li><p>If <var>host</var> <span data-x="host equals">equals</span> <var>host</var>'s
79693+
<span>public suffix</span>, then return false. <ref spec=URL></p></li>
7969779694
</ol>
7969879695
</li>
7969979696

@@ -120316,10 +120313,6 @@ INSERT INTERFACES HERE
120316120313
<dt id="refsPRESENTATION">[PRESENTATION]</dt>
120317120314
<dd><cite><a href="https://w3c.github.io/presentation-api/">Presentation API</a></cite>, M. Foltz, D. Röttsches. W3C.</dd>
120318120315

120319-
<dt id="refsPSL">[PSL]</dt>
120320-
<dd><cite><a href="https://publicsuffix.org/">Public Suffix List</a></cite>.
120321-
Mozilla Foundation.</dd>
120322-
120323120316
<dt id="refsREFERRERPOLICY">[REFERRERPOLICY]</dt>
120324120317
<dd><cite><a href="https://w3c.github.io/webappsec-referrer-policy/">Referrer Policy</a></cite>, J. Eisinger, E. Stark. W3C.</dd>
120325120318

0 commit comments

Comments
 (0)