Skip to content

Commit

Permalink
Merge pull request #3396 from microsoft-search/fix/2311
Browse files Browse the repository at this point in the history
Encode query for vertical links
  • Loading branch information
wobba authored Dec 13, 2023
2 parents a82416e + 02906d2 commit d7059c4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default class SearchVerticalsContainer extends React.Component<ISearchVer
this.props.tokenService.resolveTokens(vertical.linkUrl).then((resolvedUrl: string) => {
const inputQueryText: string = !isEmpty(GlobalSettings.getValue(BuiltinTokenNames.inputQueryText)) ? GlobalSettings.getValue(BuiltinTokenNames.inputQueryText) : "";
resolvedUrl = resolvedUrl.replace(/\{inputQueryText\}|\{searchTerms\}|\{SearchBoxQuery\}/gi, inputQueryText);
resolvedUrl = resolvedUrl.replace(inputQueryText,encodeURIComponent(inputQueryText));

if(vertical.openBehavior === PageOpenBehavior.NewTab){
window.open(resolvedUrl, "_blank");
Expand Down

0 comments on commit d7059c4

Please sign in to comment.