Skip to content

Commit

Permalink
use encodeURI instead of encodeURIComponent for shareable links (#5340)
Browse files Browse the repository at this point in the history
tree URLs are documented as `/lab/tree/path/to/notebook.ipynb` not `/lab/tree/path%2Fto%2Fnotebook.ipynb`
  • Loading branch information
minrk authored and blink1073 committed Sep 19, 2018
1 parent d600547 commit c4a9a70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/application-extension/src/index.tsx
Expand Up @@ -231,7 +231,7 @@ const tree: JupyterLabPlugin<void> = {
const treeMatch = args.path.match(Patterns.tree);
const workspaceMatch = args.path.match(Patterns.workspace);
const match = treeMatch || workspaceMatch;
const path = decodeURIComponent(match[1]);
const path = decodeURI(match[1]);
const { page, workspaces } = app.info.urls;
const workspace = PathExt.basename(app.info.workspace);
const url =
Expand Down
2 changes: 1 addition & 1 deletion packages/filebrowser-extension/src/index.ts
Expand Up @@ -440,7 +440,7 @@ function addCommands(

commands.addCommand(CommandIDs.share, {
execute: () => {
const path = encodeURIComponent(browser.selectedItems().next().path);
const path = encodeURI(browser.selectedItems().next().path);
const tree = PageConfig.getTreeUrl({ workspace: true });

Clipboard.copyToSystem(URLExt.join(tree, path));
Expand Down

0 comments on commit c4a9a70

Please sign in to comment.