Skip to content

Commit

Permalink
Use QueryString.encode instead of encodeURIComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed Oct 16, 2019
1 parent d483ed7 commit 9dab86d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import url from 'url';
import { EuiButton } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import chrome from 'ui/chrome';
import { QueryString } from 'ui/utils/query_string';
import { encode } from 'rison-node';
import { TimeRange } from '../../../../../common/http_api/shared/time_range';

Expand Down Expand Up @@ -51,7 +52,7 @@ const getOverallAnomalyExplorerLink = (pathname: string, jobId: string, timeRang
},
});

const hash = `/explorer?_g=${_g}`;
const hash = `/explorer?${QueryString.encode({ _g })}`;

return url.format({
pathname,
Expand Down Expand Up @@ -84,7 +85,7 @@ const getPartitionSpecificSingleMetricViewerLink = (
},
});

const hash = `/timeseriesexplorer?_g=${_g}&_a=${encodeURIComponent(_a)}`;
const hash = `/timeseriesexplorer?${QueryString.encode({ _g, _a })}`;

return url.format({
pathname,
Expand Down

0 comments on commit 9dab86d

Please sign in to comment.