fix: handle special characters like '#' in directory and file names (fixes issue 750)#764
Open
ed-scherer wants to merge 4 commits intomicrosoft:mainfrom
Open
fix: handle special characters like '#' in directory and file names (fixes issue 750)#764ed-scherer wants to merge 4 commits intomicrosoft:mainfrom
ed-scherer wants to merge 4 commits intomicrosoft:mainfrom
Conversation
fixes microsoft#750) - Improve path encoding/decoding in pathUtil.ts - Update previewManager to properly handle folders with special chars - Add test directory and file with special characters ('#', ' ') in names - Update tests to verify special character handling in paths
…#750) Handles URL component escaping for case when previewing loose file (outside of workspace).
- Update preview manager to handle folder hash scenarios (leading slash) - Fix test configuration and runner setup - Update connection info, endpoint manager, and preview tests - Improve test coverage for folder-based previews Fixes microsoft#750
microsoft#750) The address passed to addHistory() is already URL-encoded from window.location.pathname, so PathUtil.EscapePathParts() was causing double-encoding and breaking back/forward navigation for files with spaces or hash symbols in their names.
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previewing files that had names or paths containing "#" and other URI-invalid characters resulted in "File Not Found" errors in the preview browser window. This was due to improper URI component encoding (using
encodeURI/decodeURIinstead ofencodeURIComponent/decodeURIComponent, along with also other problems with not respecting the current format of paths (file system paths vs. URIs).Summary of changes:
pathUtil.tspreviewManager.tsto properly handle folders with special charspageHistoryTracker.ts(would cause "back" to fail to return to files with special chars in path)The bulk of the changes are related to tests; the changes to fix the problems are quite minimal.