Skip to content

Commit

Permalink
Build upon URL rather than PSL
Browse files Browse the repository at this point in the history
Instead of "parsing" the Public Suffix List directly, use new terminology from the URL Standard.

Fixes #3711.
  • Loading branch information
annevk committed Jun 4, 2018
1 parent 0d28f8f commit 97b07a8
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2663,6 +2663,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x="concept-domain" data-x-href="https://url.spec.whatwg.org/#concept-domain">domain</dfn></li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#concept-ipv4">IPv4 address</dfn></li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#concept-ipv6">IPv6 address</dfn></li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#host-same-site">same site</dfn></li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#concept-url">URL</dfn></li>
<li><dfn data-dfn-for="url" data-x="concept-url-origin" data-x-href="https://url.spec.whatwg.org/#concept-url-origin">Origin</dfn> of URLs</li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#syntax-url-absolute">Absolute URL</dfn></li>
Expand Down Expand Up @@ -79671,33 +79672,8 @@ interface <dfn>BarProp</dfn> {

<li><p>If <var>host</var> is failure, then return false.</p></li>

<li>
<p>If <var>host</var> is <em>not</em> <span data-x="host equals">equal</span> to
<var>originalHost</var>, then run these substeps:</p>

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

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

<li><p>If <var>host</var>, prefixed by a U+002E FULL STOP (.), does not exactly match the end
of <var>originalHost</var>, then return false.</p></li>

<li>
<p>If <var>host</var> matches a suffix in the Public Suffix List, or, if <var>host</var>,
prefixed by a U+002E FULL STOP (.), matches the end of a suffix in the Public Suffix List,
then return false. <ref spec=PSL></p>

<p>Suffixes must be compared after applying the <span>host parser</span> algorithm.</p>
</li>
</ol>
</li>

<li><p>Return true.</p></li>
<li><p>Return true if <var>host</var> is <span>same site</span> with <var>originalHost</var>, and
false otherwise.</p></li>
</ol>

<p>The <dfn><code data-x="dom-document-domain">domain</code></dfn> attribute's getter must run
Expand Down

0 comments on commit 97b07a8

Please sign in to comment.