From 3a137db910390bd1982a283c4efe874253e081d5 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Wed, 26 Mar 2025 19:46:31 +1300 Subject: [PATCH] Empty dummyURL's path before URL parsing in pathname canonicalization Which prevents dummy URL's pathname from being included in the beginning of the new pathname. --- spec.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/spec.bs b/spec.bs index a500313..5460aea 100644 --- a/spec.bs +++ b/spec.bs @@ -1786,6 +1786,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier 1. Append |value| to the end of |modified value|. 1. Let |dummyURL| be the result of [=creating a dummy URL=]. + 1. [=list/Empty=] |dummyURL|'s [=url/path=]. 1. Run [=basic URL parser=] given |modified value| with |dummyURL| as [=basic URL parser/url=] and [=path start state=] as [=basic URL parser/state override=]. 1. Let |result| be the result of [=URL path serializing=] |dummyURL|. 1. If |leading slash| is false, then set |result| to the [=code point substring to the end of the string|code point substring=] from 2 to the end of the string within |result|.