Skip to content

percent-encoding #110

@cspotcode

Description

@cspotcode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions