diff --git a/awx/ui/client/src/shared/smart-search/queryset.service.js b/awx/ui/client/src/shared/smart-search/queryset.service.js index 27681d18b4..943f63818b 100644 --- a/awx/ui/client/src/shared/smart-search/queryset.service.js +++ b/awx/ui/client/src/shared/smart-search/queryset.service.js @@ -132,7 +132,7 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear } if(params.singleSearchParam) { - return {[params.singleSearchParam]: encodeURIComponent(paramString + "=" + valueString)}; + return {[params.singleSearchParam]: paramString + "=" + valueString}; } else { return {[paramString] : encodeURIComponent(valueString)}; diff --git a/awx/ui/client/src/shared/smart-search/smart-search.controller.js b/awx/ui/client/src/shared/smart-search/smart-search.controller.js index cb42b09984..22dcb0c615 100644 --- a/awx/ui/client/src/shared/smart-search/smart-search.controller.js +++ b/awx/ui/client/src/shared/smart-search/smart-search.controller.js @@ -140,7 +140,7 @@ export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', ' function searchWithoutKey(term) { if($scope.singleSearchParam) { return { - [$scope.singleSearchParam]: encodeURIComponent("search=" + term) + [$scope.singleSearchParam]: "search=" + encodeURIComponent(term) }; } return { @@ -329,6 +329,10 @@ export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', ' else { if($scope.singleSearchParam && set[$scope.singleSearchParam] && set[$scope.singleSearchParam].includes("%20and%20")) { let searchParamParts = set[$scope.singleSearchParam].split("%20and%20"); + // The value side of each paramPart might have been encoded in SmartSearch.splitFilterIntoTerms + _.each(searchParamParts, (paramPart, paramPartIndex) => { + searchParamParts[paramPartIndex] = decodeURIComponent(paramPart); + }); var index = searchParamParts.indexOf(value); if (index !== -1) { searchParamParts.splice(index, 1);