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
commit b2dbc5666f
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'