Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode parameters passed into application #1365

Merged
merged 4 commits into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
4 changes: 3 additions & 1 deletion app/services/navigator.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { IpcService } from "@batch-flask/ui";

import { Constants } from "app/utils";
import { BatchLabsLink, BatchLabsLinkAction } from "common";
import * as decodeUriComponent from "decode-uri-component";
import { AccountService } from "./account.service";

export interface GotoOptions {
Expand Down Expand Up @@ -40,7 +41,8 @@ export class NavigatorService {
switch (labsLink.action) {
case BatchLabsLinkAction.route:
const params = new URLSearchParams(labsLink.queryParams);
this.goto(`${labsLink.path}?${params.toString()}`, {
const decodedParams = decodeUriComponent(params.toString());
this.goto(`${labsLink.path}?${decodedParams}`, {
accountId: labsLink.accountId,
});
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"chokidar": "~2.0.0",
"commander": "~2.13.0",
"d3": "~4.12.2",
"decode-uri-component": "^0.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change to ~ instead of ^, even though it is locked it shows differently that way when they push a minor version vs a patch

"download": "~6.2.5",
"electron-updater": "~2.21.0",
"element-resize-detector": "^1.1.13",
Expand Down