Skip to content

Commit 05e8720

Browse files
committed
Modify the assertions to check for a trailing dot
1 parent 39b2ff7 commit 05e8720

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

url.bs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,14 @@ that is included on the <cite>Public Suffix List</cite>. [[!PSL]]
787787
<ol>
788788
<li><p>If <var>host</var> is not a <a>domain</a>, then return null.
789789

790+
<li><p>Let <var>trailingDot</var> be "<code>.</code>" if <var>host</var>
791+
<a for=string>ends with</a> "<code>.</code>"; otherwise the empty string.
792+
790793
<li><p>Let <var>publicSuffix</var> be the public suffix determined by running the
791794
<a href="https://github.com/publicsuffix/list/wiki/Format#formal-algorithm">Public Suffix List algorithm</a>
792795
with <var>host</var> as domain. [[!PSL]]
793796

794-
<li><p>Assert: <var>publicSuffix</var> is an <a>ASCII string</a>.
797+
<li><p>Assert: <var>publicSuffix</var> is an <a>ASCII string that ends with trailingDot</a>.
795798

796799
<li><p>Return <var>publicSuffix</var>.
797800
</ol>
@@ -807,11 +810,14 @@ any.
807810
<li><p>If <var>host</var>'s <a for=host>public suffix</a> is null or <var>host</var>'s
808811
<a for=host>public suffix</a> <a for=host>equals</a> <var>host</var>, then return null.
809812

813+
<li><p>Let <var>trailingDot</var> be "<code>.</code>" if <var>host</var>
814+
<a for=string>ends with</a> "<code>.</code>"; otherwise the empty string.
815+
810816
<li><p>Let <var>registrableDomain</var> be the registrable domain determined by running the
811817
<a href="https://github.com/publicsuffix/list/wiki/Format#formal-algorithm">Public Suffix List algorithm</a>
812818
with <var>host</var> as domain. [[!PSL]]
813819

814-
<li><p>Assert: <var>registrableDomain</var> is an <a>ASCII string</a>.
820+
<li><p>Assert: <var>registrableDomain</var> is an <a>ASCII string that ends with trailingDot</a>.
815821

816822
<li><p>Return <var>registrableDomain</var>.
817823
</ol>

0 commit comments

Comments
 (0)