Merge pull request #170 from mabashian/sanitize-parent-object

Sanitize notification/schedule list titles
This commit is contained in:
Michael Abashian
2017-08-04 11:11:02 -04:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -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'

View File

@@ -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'