Wrong file: scope when file path contains spaces or special characters
Created by: lguychard
When navigating too a tree/blob, the search field will be scoped to the current repo/file:
However, when the file path contains spaces or other special characters, the scoped query is build from the URL-encoded file path, which will return no search results:
This is because the file path we use to build the scoped query is parsed from the location.
However, simply fixing parseBrowserRepoURL
to decodeURIComponent(filePath)
is not enough: if the decoded file path contains spaces, we would need to quote it to insert it as a valid filter.