Re: [whatwg/url] Parsing with state override set to opaque path can make URLs not roundtrip (Issue #909)

Scripter17 left a comment (whatwg/url#909)

> It could probably be made to work, but it would require special care and it's not entirely clear if it's worth the effort. Consider if you had `opaque:path` and then you'd do `.pathname = "//newpath"`. The no-ops are usually because existing implementations already no-opped or did something bad.

Theoretically you could just change leading // to /%2F. There's already the thing where an opaque path's trailing space is only encoded if it's just before the query/fragment, even though always encoding the trailing space makes the URL parser give identical results without further blocking setting opaque paths.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/909#issuecomment-4492078708
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/909/4492078708@github.com>

Received on Tuesday, 19 May 2026 21:11:42 UTC