Re: [whatwg/url] Prevent the pathname setter from erasing the path of path-only URLs, … (#582)

@annevk commented on this pull request.

Thanks for spotting this, this does look like a somewhat serious oversight.

> @@ -2298,6 +2298,10 @@ these steps:
 
        <li><p>If <a>c</a> is not U+002F (/), then decrease <var>pointer</var> by 1.
       </ol>
+
+     <li><p>Otherwise, if <var>state override</var> is given and <var>url</var>'s
+      <a for=url>host</a> is null, <a for=list>append</a> the empty string to <var>url</var>'s
+      <a for=url>path</a>

Why only when host is null? It seems this needs to generally happen.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/582#pullrequestreview-595173612

Received on Monday, 22 February 2021 09:53:50 UTC