diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/SearchUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/SearchUtils.tsx index 334fc672a69..7ca73b965e3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/SearchUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/SearchUtils.tsx @@ -52,10 +52,12 @@ export const getSearchAPIQueryParams = ( trackTotalHits = false ): Record => { const start = (from - 1) * size; + + const encodedQueryString = queryString ? encodeURIComponent(queryString) : ''; const query = - queryString && queryString === WILD_CARD_CHAR - ? queryString - : `*${queryString}*`; + encodedQueryString === WILD_CARD_CHAR + ? encodedQueryString + : `*${encodedQueryString}*`; const params: Record = { q: query + (filters ? ` AND ${filters}` : ''),