Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Normalize URI encodings #228

Merged
merged 3 commits into from
May 4, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use it in path2uri
  • Loading branch information
felixfbecker committed May 4, 2017
commit d9009e742a3bcfad9c24b784de5ca65f7f60ad7c
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function path2uri(root: string, file: string): string {
p = file;
}
p = toUnixPath(p).split('/').map((val, i) => i <= 1 && /^[a-z]:$/i.test(val) ? val : encodeURIComponent(val)).join('/');
return ret + p;
return normalizeUri(ret + p);
}

export function uri2path(uri: string): string {
Expand Down