diff --git a/awx/ui/client/src/controllers/Credentials.js b/awx/ui/client/src/controllers/Credentials.js
index 33bb40495b..7637a7a229 100644
--- a/awx/ui/client/src/controllers/Credentials.js
+++ b/awx/ui/client/src/controllers/Credentials.js
@@ -14,7 +14,7 @@
export function CredentialsList($scope, $rootScope, $location, $log,
$stateParams, Rest, Alert, CredentialList, GenerateList, Prompt, SearchInit,
PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath,
- SelectionInit, GetChoices, Wait, $state) {
+ SelectionInit, GetChoices, Wait, $state, $filter) {
ClearScope();
Wait('start');
@@ -116,7 +116,7 @@ export function CredentialsList($scope, $rootScope, $location, $log,
Prompt({
hdr: 'Delete',
- body: '
Are you sure you want to delete the credential below?
' + name + '
',
+ body: 'Are you sure you want to delete the credential below?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
@@ -129,7 +129,7 @@ CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'CredentialList', 'generateList', 'Prompt',
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'GetChoices', 'Wait',
- '$state',
+ '$state', '$filter'
];
diff --git a/awx/ui/client/src/controllers/Projects.js b/awx/ui/client/src/controllers/Projects.js
index 724902ba6f..0fb826906a 100644
--- a/awx/ui/client/src/controllers/Projects.js
+++ b/awx/ui/client/src/controllers/Projects.js
@@ -260,7 +260,7 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to delete the project below?
' + name + '
',
+ body: 'Are you sure you want to delete the project below?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
diff --git a/awx/ui/client/src/controllers/Teams.js b/awx/ui/client/src/controllers/Teams.js
index 4d73d09642..a8eed62bc5 100644
--- a/awx/ui/client/src/controllers/Teams.js
+++ b/awx/ui/client/src/controllers/Teams.js
@@ -14,7 +14,7 @@
export function TeamsList($scope, $rootScope, $location, $log, $stateParams,
Rest, Alert, TeamList, GenerateList, Prompt, SearchInit, PaginateInit,
ReturnToCaller, ClearScope, ProcessErrors, SetTeamListeners, GetBasePath,
- SelectionInit, Wait, $state, Refresh) {
+ SelectionInit, Wait, $state, Refresh, $filter) {
ClearScope();
@@ -115,7 +115,7 @@ export function TeamsList($scope, $rootScope, $location, $log, $stateParams,
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to delete the team below?
' + name + '
',
+ body: 'Are you sure you want to delete the team below?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
@@ -126,7 +126,7 @@ TeamsList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'TeamList', 'generateList', 'Prompt',
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'SetTeamListeners', 'GetBasePath', 'SelectionInit', 'Wait',
- '$state', 'Refresh'
+ '$state', 'Refresh', '$filter'
];
diff --git a/awx/ui/client/src/controllers/Users.js b/awx/ui/client/src/controllers/Users.js
index bf1f86feec..7c9560f7ad 100644
--- a/awx/ui/client/src/controllers/Users.js
+++ b/awx/ui/client/src/controllers/Users.js
@@ -34,7 +34,7 @@ function user_type_sync($scope) {
export function UsersList($scope, $rootScope, $location, $log, $stateParams,
Rest, Alert, UserList, GenerateList, Prompt, SearchInit, PaginateInit,
ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit,
- Wait, $state, Refresh) {
+ Wait, $state, Refresh, $filter) {
ClearScope();
@@ -125,7 +125,7 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams,
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to delete the user below?
' + name + '
',
+ body: 'Are you sure you want to delete the user below?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
@@ -136,7 +136,7 @@ UsersList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'UserList', 'generateList', 'Prompt',
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'Wait', '$state',
- 'Refresh'
+ 'Refresh', '$filter'
];
diff --git a/awx/ui/client/src/helpers/Jobs.js b/awx/ui/client/src/helpers/Jobs.js
index 494261222d..5be8d23d06 100644
--- a/awx/ui/client/src/helpers/Jobs.js
+++ b/awx/ui/client/src/helpers/Jobs.js
@@ -215,8 +215,11 @@ export default
* Called from JobsList controller to load each section or list on the page
*
*/
- .factory('LoadJobsScope', ['$stateParams', '$location', '$compile', 'SearchInit', 'PaginateInit', 'generateList', 'JobsControllerInit', 'JobsListUpdate',
- function($stateParams, $location, $compile, SearchInit, PaginateInit, GenerateList, JobsControllerInit, JobsListUpdate) {
+ .factory('LoadJobsScope', ['$stateParams', '$location', '$compile',
+ 'SearchInit', 'PaginateInit', 'generateList', 'JobsControllerInit',
+ 'JobsListUpdate',
+ function($stateParams, $location, $compile, SearchInit, PaginateInit,
+ GenerateList, JobsControllerInit, JobsListUpdate) {
return function(params) {
var parent_scope = params.parent_scope,
scope = params.scope,
@@ -277,8 +280,10 @@ export default
};
}])
- .factory('DeleteJob', ['Find', 'GetBasePath', 'Rest', 'Wait', 'ProcessErrors', 'Prompt', 'Alert',
- function(Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert){
+ .factory('DeleteJob', ['Find', 'GetBasePath', 'Rest', 'Wait',
+ 'ProcessErrors', 'Prompt', 'Alert', '$filter',
+ function(Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert,
+ $filter){
return function(params) {
var scope = params.scope,
id = params.id,
@@ -376,7 +381,7 @@ export default
}
scope.removeCancelJob = scope.$on('CancelJob', function() {
var cancelBody = "Submit the request to cancel?
";
- var deleteBody = "Are you sure you want to delete the job below?
#" + id + " " + job.name + "
";
+ var deleteBody = "Are you sure you want to delete the job below?
#" + id + " " + $filter('sanitize')(job.name) + "
";
Prompt({
hdr: hdr,
body: (action_label === 'cancel' || job.status === 'new') ? cancelBody : deleteBody,
diff --git a/awx/ui/client/src/helpers/Schedules.js b/awx/ui/client/src/helpers/Schedules.js
index 716653b39b..97745a15a0 100644
--- a/awx/ui/client/src/helpers/Schedules.js
+++ b/awx/ui/client/src/helpers/Schedules.js
@@ -429,8 +429,10 @@ export default
* })
*
*/
- .factory('DeleteSchedule', ['GetBasePath','Rest', 'Wait', 'ProcessErrors', 'Prompt', 'Find', '$location',
- function(GetBasePath, Rest, Wait, ProcessErrors, Prompt, Find, $location) {
+ .factory('DeleteSchedule', ['GetBasePath','Rest', 'Wait',
+ 'ProcessErrors', 'Prompt', 'Find', '$location', '$filter',
+ function(GetBasePath, Rest, Wait, ProcessErrors, Prompt, Find,
+ $location, $filter) {
return function(params) {
var scope = params.scope,
@@ -474,7 +476,7 @@ export default
Prompt({
hdr: hdr,
- body: 'Are you sure you want to delete the schedule below?
' + schedule.name + '
',
+ body: 'Are you sure you want to delete the schedule below?
' + $filter('sanitize')(schedule.name) + '
',
action: action,
actionText: 'DELETE',
backdrop: false
diff --git a/awx/ui/client/src/inventories/edit/inventory-edit.controller.js b/awx/ui/client/src/inventories/edit/inventory-edit.controller.js
index 0b3e92d7fc..d198683677 100644
--- a/awx/ui/client/src/inventories/edit/inventory-edit.controller.js
+++ b/awx/ui/client/src/inventories/edit/inventory-edit.controller.js
@@ -15,7 +15,8 @@ function InventoriesEdit($scope, $rootScope, $compile, $location,
ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit,
PaginateInit, LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON,
ParseVariableString, RelatedSearchInit, RelatedPaginateInit,
- Prompt, InitiatePlaybookRun, CreateDialog, deleteJobTemplate, $state) {
+ Prompt, InitiatePlaybookRun, CreateDialog, deleteJobTemplate, $state,
+ $filter) {
ClearScope();
@@ -312,7 +313,7 @@ function InventoriesEdit($scope, $rootScope, $compile, $location,
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to delete the job template below?
' + this.scan_job_template.name + '
',
+ body: 'Are you sure you want to delete the job template below?
' + $filter('sanitize')(this.scan_job_template.name) + '
',
action: action,
actionText: 'DELETE'
});
@@ -328,5 +329,5 @@ export default ['$scope', '$rootScope', '$compile', '$location',
'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString',
'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt',
'InitiatePlaybookRun', 'CreateDialog', 'deleteJobTemplate', '$state',
- InventoriesEdit,
+ '$filter', InventoriesEdit,
];
diff --git a/awx/ui/client/src/inventories/manage/hosts/hosts-list.controller.js b/awx/ui/client/src/inventories/manage/hosts/hosts-list.controller.js
index b88801bcd7..3c48cf8603 100644
--- a/awx/ui/client/src/inventories/manage/hosts/hosts-list.controller.js
+++ b/awx/ui/client/src/inventories/manage/hosts/hosts-list.controller.js
@@ -5,9 +5,9 @@
*************************************************/
export default
['$scope', '$rootScope', '$state', '$stateParams', 'InventoryHosts', 'generateList', 'InventoryManageService', 'HostManageService',
- 'hostsUrl', 'SearchInit', 'PaginateInit', 'SetStatus', 'Prompt', 'Wait', 'inventoryData',
+ 'hostsUrl', 'SearchInit', 'PaginateInit', 'SetStatus', 'Prompt', 'Wait', 'inventoryData', '$filter',
function($scope, $rootScope, $state, $stateParams, InventoryHosts, generateList, InventoryManageService, HostManageService,
- hostsUrl, SearchInit, PaginateInit, SetStatus, Prompt, Wait, inventoryData){
+ hostsUrl, SearchInit, PaginateInit, SetStatus, Prompt, Wait, inventoryData, $filter){
var list = InventoryHosts,
view = generateList,
pageSize = 20;
@@ -27,7 +27,7 @@
$state.go('inventoryManage.editHost', {host_id: id});
};
$scope.deleteHost = function(id, name){
- var body = 'Are you sure you want to permanently delete the host below from the inventory?
' + name + '
';
+ var body = 'Are you sure you want to permanently delete the host below from the inventory?
' + $filter('sanitize')(name) + '
';
var action = function(){
delete $rootScope.promptActionBtnClass;
Wait('start');
diff --git a/awx/ui/client/src/inventory-scripts/list/list.controller.js b/awx/ui/client/src/inventory-scripts/list/list.controller.js
index c4e83cf0c9..c9f3e4d360 100644
--- a/awx/ui/client/src/inventory-scripts/list/list.controller.js
+++ b/awx/ui/client/src/inventory-scripts/list/list.controller.js
@@ -6,12 +6,12 @@
export default
[ '$rootScope','Wait', 'generateList', 'inventoryScriptsListObject',
- 'GetBasePath' , 'SearchInit' , 'PaginateInit',
- 'Rest' , 'ProcessErrors', 'Prompt', '$state',
+ 'GetBasePath' , 'SearchInit' , 'PaginateInit', 'Rest' , 'ProcessErrors',
+ 'Prompt', '$state', '$filter',
function(
$rootScope,Wait, GenerateList, inventoryScriptsListObject,
GetBasePath, SearchInit, PaginateInit,
- Rest, ProcessErrors, Prompt, $state
+ Rest, ProcessErrors, Prompt, $state, $filter
) {
var scope = $rootScope.$new(),
defaultUrl = GetBasePath('inventory_scripts'),
@@ -70,7 +70,7 @@ export default
});
};
- var bodyHtml = 'Are you sure you want to delete the inventory script below?
' + name + '
';
+ var bodyHtml = 'Are you sure you want to delete the inventory script below?
' + $filter('sanitize')(name) + '
';
Prompt({
hdr: 'Delete',
body: bodyHtml,
diff --git a/awx/ui/client/src/job-templates/labels/labelsList.directive.js b/awx/ui/client/src/job-templates/labels/labelsList.directive.js
index d9ef63b237..8daec58f2b 100644
--- a/awx/ui/client/src/job-templates/labels/labelsList.directive.js
+++ b/awx/ui/client/src/job-templates/labels/labelsList.directive.js
@@ -67,7 +67,7 @@ export default
};
Prompt({
- hdr: 'Remove Label from ' + templateName,
+ hdr: 'Remove Label from ' + templateName + "",
body: 'Confirm the removal of the ' + $filter('sanitize')(labelName) + ' label.
',
action: action,
actionText: 'REMOVE'
diff --git a/awx/ui/client/src/notifications/notification-templates-list/list.controller.js b/awx/ui/client/src/notifications/notification-templates-list/list.controller.js
index 861fa18d98..5a7a76b8a9 100644
--- a/awx/ui/client/src/notifications/notification-templates-list/list.controller.js
+++ b/awx/ui/client/src/notifications/notification-templates-list/list.controller.js
@@ -224,7 +224,7 @@ export default
msg: 'Call to ' + url + ' failed. DELETE returned status: ' + status });
});
};
- var bodyHtml = 'Are you sure you want to delete the notification template below?
' + name + '
';
+ var bodyHtml = 'Are you sure you want to delete the notification template below?
' + $filter('sanitize')(name) + '
';
Prompt({
hdr: 'Delete',
body: bodyHtml,
diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js
index 2f2c844a49..8cf2156dea 100644
--- a/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js
+++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-admins.controller.js
@@ -4,10 +4,12 @@
* All Rights Reserved
*************************************************/
-export default ['$stateParams', '$scope', 'UserList', 'Rest', '$state', 'generateList', '$compile',
- 'SearchInit', 'PaginateInit', 'Wait', 'Prompt', 'ProcessErrors', 'GetBasePath',
- function($stateParams, $scope, UserList, Rest, $state, GenerateList, $compile,
- SearchInit, PaginateInit, Wait, Prompt, ProcessErrors, GetBasePath) {
+export default ['$stateParams', '$scope', 'UserList', 'Rest', '$state',
+ 'generateList', '$compile', 'SearchInit', 'PaginateInit', 'Wait',
+ 'Prompt', 'ProcessErrors', 'GetBasePath', '$filter',
+ function($stateParams, $scope, UserList, Rest, $state, GenerateList,
+ $compile, SearchInit, PaginateInit, Wait, Prompt, ProcessErrors,
+ GetBasePath, $filter) {
var list,
url,
@@ -88,7 +90,7 @@ export default ['$stateParams', '$scope', 'UserList', 'Rest', '$state', 'generat
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to remove the following administrator from this organization?
' + name + '
',
+ body: 'Are you sure you want to remove the following administrator from this organization?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js
index 3d7bdbfb28..c71c48c432 100644
--- a/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js
+++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-users.controller.js
@@ -4,10 +4,12 @@
* All Rights Reserved
*************************************************/
- export default ['$stateParams', '$scope', 'UserList', 'Rest', '$state', 'generateList', '$compile',
- 'SearchInit', 'PaginateInit', 'Wait', 'Prompt', 'ProcessErrors', 'GetBasePath',
- function($stateParams, $scope, UserList, Rest, $state, GenerateList, $compile,
- SearchInit, PaginateInit, Wait, Prompt, ProcessErrors, GetBasePath) {
+ export default ['$stateParams', '$scope', 'UserList', 'Rest', '$state',
+ 'generateList', '$compile', 'SearchInit', 'PaginateInit', 'Wait',
+ 'Prompt', 'ProcessErrors', 'GetBasePath', '$filter',
+ function($stateParams, $scope, UserList, Rest, $state, GenerateList,
+ $compile,SearchInit, PaginateInit, Wait, Prompt, ProcessErrors,
+ GetBasePath, $filter) {
var list,
url,
@@ -87,7 +89,7 @@
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to remove the following user from this organization?
' + name + '
',
+ body: 'Are you sure you want to remove the following user from this organization?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
diff --git a/awx/ui/client/src/organizations/list/organizations-list.controller.js b/awx/ui/client/src/organizations/list/organizations-list.controller.js
index 45350cd5e3..84510a60dc 100644
--- a/awx/ui/client/src/organizations/list/organizations-list.controller.js
+++ b/awx/ui/client/src/organizations/list/organizations-list.controller.js
@@ -8,12 +8,12 @@ export default ['$stateParams', '$scope', '$rootScope', '$location',
'$log', '$compile', 'Rest', 'PaginateInit',
'SearchInit', 'OrganizationList', 'Alert', 'Prompt', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'Wait',
- '$state', 'generateList', 'Refresh',
+ '$state', 'generateList', 'Refresh', '$filter',
function($stateParams, $scope, $rootScope, $location,
$log, $compile, Rest, PaginateInit,
SearchInit, OrganizationList, Alert, Prompt, ClearScope,
ProcessErrors, GetBasePath, Wait,
- $state, generateList, Refresh) {
+ $state, generateList, Refresh, $filter) {
ClearScope();
@@ -144,7 +144,7 @@ export default ['$stateParams', '$scope', '$rootScope', '$location',
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to delete the organization below?
' + name + '
',
+ body: 'Are you sure you want to delete the organization below?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
diff --git a/awx/ui/client/src/permissions/list/list.controller.js b/awx/ui/client/src/permissions/list/list.controller.js
index 4b6412fff4..85140f6626 100644
--- a/awx/ui/client/src/permissions/list/list.controller.js
+++ b/awx/ui/client/src/permissions/list/list.controller.js
@@ -12,8 +12,15 @@
export default
- ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'permissionsList', 'generateList', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath', 'CheckAccess', 'Wait', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect',
- function ($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, permissionsList, GenerateList, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, CheckAccess, Wait, fieldChoices, fieldLabels, permissionsSearchSelect) {
+ ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest',
+ 'Alert', 'permissionsList', 'generateList', 'Prompt', 'SearchInit',
+ 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
+ 'GetBasePath', 'CheckAccess', 'Wait', 'fieldChoices', 'fieldLabels',
+ 'permissionsSearchSelect', '$filter',
+ function ($scope, $rootScope, $location, $log, $stateParams, Rest,
+ Alert, permissionsList, GenerateList, Prompt, SearchInit, PaginateInit,
+ ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, CheckAccess,
+ Wait, fieldChoices, fieldLabels, permissionsSearchSelect, $filter) {
ClearScope();
@@ -127,7 +134,7 @@ export default
if ($scope.PermissionAddAllowed) {
Prompt({
hdr: 'Delete',
- body: 'Are you sure you want to delete the permission below?
' + name + '
',
+ body: 'Are you sure you want to delete the permission below?
' + $filter('sanitize')(name) + '
',
action: action,
actionText: 'DELETE'
});
diff --git a/awx/ui/client/src/shared/list-generator/list-generator.factory.js b/awx/ui/client/src/shared/list-generator/list-generator.factory.js
index 94ec78468e..4d3d00ef6c 100644
--- a/awx/ui/client/src/shared/list-generator/list-generator.factory.js
+++ b/awx/ui/client/src/shared/list-generator/list-generator.factory.js
@@ -548,7 +548,6 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
innerTable += (field_action === 'delete') ? "List-actionButton--delete" : "";
innerTable += (field_action === 'cancel') ? "cancel red-txt" : "";
innerTable += "\" ";
- // debugger;
// rowBeingEdited === '{{ " + list.iterator + ".id }}' && listBeingEdited === '" + list.name + "' ? 'List-tableRow--selected' : ''";
innerTable += (field_action === 'edit') ? "ng-class=\"[rowBeingEdited === '{{ " + list.iterator + ".id }}' && listBeingEdited === '" + list.name + "' ? 'List-editButton--selected' : '']\"" : "";
innerTable += (fAction.awPopOver) ? "aw-pop-over=\"" + fAction.awPopOver + "\" " : "";
diff --git a/awx/ui/client/src/shared/prompt/prompt.less b/awx/ui/client/src/shared/prompt/prompt.less
index b4c1237c50..00ac7898b0 100644
--- a/awx/ui/client/src/shared/prompt/prompt.less
+++ b/awx/ui/client/src/shared/prompt/prompt.less
@@ -1,5 +1,9 @@
@import "awx/ui/client/src/shared/branding/colors.default.less";
+.Prompt-titleTarget {
+ word-break: break-word;
+}
+
.Prompt-bodyQuery {
margin-bottom: 20px;
color: @default-interface-txt;
diff --git a/awx/ui/client/src/shared/xss-sanitizer.filter.js b/awx/ui/client/src/shared/xss-sanitizer.filter.js
index b5303672f0..271bbca80f 100644
--- a/awx/ui/client/src/shared/xss-sanitizer.filter.js
+++ b/awx/ui/client/src/shared/xss-sanitizer.filter.js
@@ -6,7 +6,7 @@
angular.module('sanitizeFilter', []).filter('sanitize', function() {
return function(input) {
- input = input.replace(//g, ">").replace(/'/g, "'").replace(/"/g, """);
+ input = $("").text(input)[0].innerHTML;
return input;
};
});