Skip to content

Commit

Permalink
Encode searchId as it tends to be decoded after adds into url
Browse files Browse the repository at this point in the history
Signed-off-by: Yuanqi(Ella) Zhu <[email protected]>
  • Loading branch information
zhyuanqi authored Oct 9, 2024
1 parent 98df4dd commit 45c0cdd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/plugins/visualizations/public/wizard/new_vis_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ class NewVisModal extends React.Component<TypeSelectionProps, TypeSelectionState
}

params = [`type=${encodeURIComponent(visType.name)}`];
searchId = encodeURIComponent(searchId || '');

if (searchType) {
params.push(`${searchType === 'search' ? 'savedSearchId' : 'indexPattern'}=${searchId}`);
Expand Down

0 comments on commit 45c0cdd

Please sign in to comment.