Closed
Bug 1877573
Opened 1 year ago
Closed 1 year ago
URL constructor doesn't parse URL correctly
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1507354
People
(Reporter: nicholas, Unassigned)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0
Steps to reproduce:
const url = new URL("file://foo/bar/baz")
Actual results:
Got these values for the properties:
host: ""
hostname: ""
href: "file:///bar/baz"
origin: "null",
pathname: "/bar/baz"
protocol: "file:"
Expected results:
host: "foo"
hostname: "foo"
href: "file://foo/bar/baz"
origin: "file://",
pathname: "/bar/baz"
protocol: "file:"
Comment 1•1 year ago
|
||
Parses exactly as the reference parser says it should: https://jsdom.github.io/whatwg-url/#url=ZmlsZTovL2Zvby9iYXIvYmF6&base=YWJvdXQ6Ymxhbms=
You may find const url = new URL("file:foo/bar/baz") is really what you're looking for here.
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
Updated•1 year ago
|
Keywords: regression
Regressed by: 1603699
It's not parsed as the specified. That is why some parts are red on jsdom.
Duplicate of bug: 1507354
Resolution: INVALID → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•