mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 02:01:01 -03:30
Merge pull request #170 from mabashian/sanitize-parent-object
Sanitize notification/schedule list titles
This commit is contained in:
@@ -16,9 +16,9 @@ export default {
|
|||||||
views: {
|
views: {
|
||||||
'@managementJobsList': {
|
'@managementJobsList': {
|
||||||
controller: 'managementJobsNotificationsController',
|
controller: 'managementJobsNotificationsController',
|
||||||
templateProvider: function(NotificationsList, generateList, ParentObject) {
|
templateProvider: function(NotificationsList, generateList, ParentObject, $filter) {
|
||||||
// include name of parent resource in listTitle
|
// include name of parent resource in listTitle
|
||||||
NotificationsList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('Notifications');
|
NotificationsList.listTitle = `${$filter('sanitize')(ParentObject.name)}<div class='List-titleLockup'></div>` + N_('Notifications');
|
||||||
let html = generateList.build({
|
let html = generateList.build({
|
||||||
list: NotificationsList,
|
list: NotificationsList,
|
||||||
mode: 'edit'
|
mode: 'edit'
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ angular.module('managementJobScheduler', [])
|
|||||||
},
|
},
|
||||||
views: {
|
views: {
|
||||||
'@managementJobsList': {
|
'@managementJobsList': {
|
||||||
templateProvider: function(ScheduleList, generateList, ParentObject) {
|
templateProvider: function(ScheduleList, generateList, ParentObject, $filter) {
|
||||||
// include name of parent resource in listTitle
|
// include name of parent resource in listTitle
|
||||||
ScheduleList.listTitle = `${ParentObject.name}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
|
ScheduleList.listTitle = `${$filter('sanitize')(ParentObject.name)}<div class='List-titleLockup'></div>` + N_('SCHEDULES');
|
||||||
let html = generateList.build({
|
let html = generateList.build({
|
||||||
list: ScheduleList,
|
list: ScheduleList,
|
||||||
mode: 'edit'
|
mode: 'edit'
|
||||||
|
|||||||
Reference in New Issue
Block a user