From 02906d2f37cf3a41f2712af039991f8fb416c8d5 Mon Sep 17 00:00:00 2001 From: Mikael Svenson Date: Wed, 13 Dec 2023 13:07:25 +0100 Subject: [PATCH] Encode query for vertical links --- .../searchVerticals/components/SearchVerticalsContainer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/search-parts/src/webparts/searchVerticals/components/SearchVerticalsContainer.tsx b/search-parts/src/webparts/searchVerticals/components/SearchVerticalsContainer.tsx index 209173a0..3c81ea05 100644 --- a/search-parts/src/webparts/searchVerticals/components/SearchVerticalsContainer.tsx +++ b/search-parts/src/webparts/searchVerticals/components/SearchVerticalsContainer.tsx @@ -99,6 +99,7 @@ export default class SearchVerticalsContainer extends React.Component { 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");