Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

percent-encoding #110

Open
cspotcode opened this issue May 1, 2022 · 0 comments
Open

percent-encoding #110

cspotcode opened this issue May 1, 2022 · 0 comments

Comments

@cspotcode
Copy link

I'm not sure this is a bug report, but I thought it worth mentioning that I've encountered this issue. It might make sense to call out in the README.

I hit this in my work on cspotcode/node-source-map-support#38 source-map-support did not handle conversion between spaces and %20 correctly. Sometimes it would output a file:///path/to/file with spaces.ts instead of file%20with...

I'm improving the test coverage and will now ensure that file URLs are percent-encoded and paths are not. I'm doing this with some normalization steps before calling resolve-uri. It's ambiguous for relative stuff, since we can't know if it's a relative path or a relative URI, so we don't know if the filename has the three-character sequence %20 or if it has a filename. But at least we can differentiate absolute paths from absolute file URIs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant