Merge pull request #4699 from mabashian/4175-fix-it

Fixed bug where organization with a & in it was causing failed api requests
This commit is contained in:
Michael Abashian 2017-01-12 15:46:29 -05:00 committed by GitHub
commit 3be2da061a

View File

@ -484,7 +484,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper'])
function applyValidation(viewValue) {
basePath = GetBasePath(elm.attr('data-basePath')) || elm.attr('data-basePath');
query = elm.attr('data-query');
query = query.replace(/\:value/, encodeURI(viewValue));
query = query.replace(/\:value/, encodeURIComponent(viewValue));
Rest.setUrl(`${basePath}${query}`);
// https://github.com/ansible/ansible-tower/issues/3549
// capturing both success/failure conditions in .then() promise