1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Sanitize schedule titles

This commit is contained in:
mabashian 2017-08-02 10:21:16 -04:00
parent c6a790bd24
commit 073af62cf9

View File

@ -85,9 +85,9 @@ export default
}, },
views: { views: {
'@': { '@': {
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'
@ -178,9 +178,9 @@ export default
}, },
views: { views: {
'@': { '@': {
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'
@ -268,9 +268,9 @@ export default
}, },
views: { views: {
'@': { '@': {
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'