- From: Alwin Blok <notifications@github.com>
- Date: Mon, 05 Oct 2020 09:18:44 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 5 October 2020 16:18:57 UTC
I am not sure if the example is to be taken literally, but just in case, `new URL('file://' + path.resolve(filepath))` would solve some issues (assuming resolve returns absolute paths and collapses slashes). Better yet, you can use the pathname setter to be safe about `#` and `?` characters in directory/file names, but you do still have to manually escape percent signs, and backslashes in names within posix style paths. Ideally there would be a path.toURL library method for such conversions. -- 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/544#issuecomment-703737030
Received on Monday, 5 October 2020 16:18:57 UTC