Skip to content

Commit

Permalink
Decode URL parameter filePath once read.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Dec 9, 2024
1 parent 2f69e27 commit a9fa725
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/contexts/UrlContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ const getWindowUrlSearchParams = () => {
// This ensures any parameters following `filePath=` are incorporated into the `filePath`.
const [, filePath] = window.location.search.split("filePath=");
if ("undefined" !== typeof filePath && 0 !== filePath.length) {
searchParams[SEARCH_PARAM_NAMES.FILE_PATH] = getAbsoluteUrl(filePath);
const decodedFilePath = decodeURIComponent(filePath);
searchParams[SEARCH_PARAM_NAMES.FILE_PATH] = getAbsoluteUrl(decodedFilePath);
}
}

Expand Down

0 comments on commit a9fa725

Please sign in to comment.