Re: [whatwg/url] Consider adding a constructor to make a URL from parts (#354)

Another use-case would be to convert URLs from older standards. This is something I'm going to have to work out soon, and I don't expect it to be _entirely_ trivial - each component would need to be validated and percent-encoded, the host would need to get parsed, the path simplified, etc. Basically, another URL parser.

It would be nice if there was some common algorithm for it - or if the URL parser in the spec was refactored to split the logic which detects component boundaries from the logic which parses and encodes the component's contents.

-- 
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/issues/354#issuecomment-819413073

Received on Wednesday, 14 April 2021 10:29:23 UTC