Sanitize notification/schedule list titles

This commit is contained in:
mabashian 2017-08-03 09:43:13 -04:00
parent ec4092b715
commit 608c79ed56
2 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@ export default {
views: {
'@managementJobsList': {
controller: 'managementJobsNotificationsController',
templateProvider: function(NotificationsList, generateList, ParentObject) {
templateProvider: function(NotificationsList, generateList, ParentObject, $filter) {
// 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({
list: NotificationsList,
mode: 'edit'

View File

@ -27,9 +27,9 @@ angular.module('managementJobScheduler', [])
},
views: {
'@managementJobsList': {
templateProvider: function(ScheduleList, generateList, ParentObject) {
templateProvider: function(ScheduleList, generateList, ParentObject, $filter) {
// 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({
list: ScheduleList,
mode: 'edit'