add htmlEncode to various comment/description fields
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
bcf90a51b0
commit
5171a29935
@ -51,7 +51,7 @@ Ext.define('PVE.RestProxy', {
|
||||
text += " (+ " + info.tfa + ")";
|
||||
}
|
||||
|
||||
return text;
|
||||
return Ext.String.htmlEncode(text);
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -131,6 +131,7 @@ Ext.define('PVE.dc.AuthView', {
|
||||
id: 'comment',
|
||||
header: gettext('Comment'),
|
||||
sortable: false,
|
||||
renderer: Ext.String.htmlEncode,
|
||||
dataIndex: 'comment',
|
||||
flex: 1
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ Ext.define('PVE.dc.GroupView', {
|
||||
header: gettext('Comment'),
|
||||
sortable: false,
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
],
|
||||
|
@ -96,6 +96,7 @@ Ext.define('PVE.dc.PoolView', {
|
||||
header: gettext('Comment'),
|
||||
sortable: false,
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
],
|
||||
|
@ -167,7 +167,7 @@ Ext.define('PVE.SecurityGroupList', {
|
||||
selModel: sm,
|
||||
columns: [
|
||||
{ header: gettext('Group'), dataIndex: 'group', width: 100 },
|
||||
{ header: gettext('Comment'), dataIndex: 'comment', flex: 1 }
|
||||
{ header: gettext('Comment'), dataIndex: 'comment', renderer: Ext.String.htmlEncode, flex: 1 }
|
||||
],
|
||||
listeners: {
|
||||
itemdblclick: run_editor,
|
||||
|
@ -221,6 +221,7 @@ Ext.define('PVE.dc.UserView', {
|
||||
header: gettext('Comment'),
|
||||
sortable: false,
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
],
|
||||
|
@ -29,6 +29,7 @@ Ext.define('PVE.form.GroupSelector', {
|
||||
header: gettext('Comment'),
|
||||
sortable: false,
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
]
|
||||
|
@ -64,6 +64,7 @@ Ext.define('PVE.form.IPRefSelector', {
|
||||
{
|
||||
header: gettext('Comment'),
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
]);
|
||||
|
@ -29,6 +29,7 @@ Ext.define('PVE.form.PoolSelector', {
|
||||
header: gettext('Comment'),
|
||||
sortable: false,
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
]
|
||||
|
@ -34,6 +34,7 @@ Ext.define('PVE.form.SecurityGroupsSelector', {
|
||||
{
|
||||
header: gettext('Comment'),
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
]
|
||||
|
@ -42,6 +42,7 @@ Ext.define('PVE.form.UserSelector', {
|
||||
header: gettext('Comment'),
|
||||
sortable: false,
|
||||
dataIndex: 'comment',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
]
|
||||
|
@ -171,7 +171,7 @@ Ext.define('PVE.FirewallAliases', {
|
||||
columns: [
|
||||
{ header: gettext('Name'), dataIndex: 'name', width: 100 },
|
||||
{ header: gettext('IP/CIDR'), dataIndex: 'cidr', width: 100 },
|
||||
{ header: gettext('Comment'), dataIndex: 'comment', flex: 1 }
|
||||
{ header: gettext('Comment'), dataIndex: 'comment', renderer: Ext.String.htmlEncode, flex: 1 }
|
||||
],
|
||||
listeners: {
|
||||
itemdblclick: run_editor
|
||||
|
@ -36,6 +36,7 @@ Ext.define('PVE.form.FWMacroSelector', {
|
||||
{
|
||||
header: gettext('Description'),
|
||||
flex: 1,
|
||||
renderer: Ext.String.htmlEncode,
|
||||
dataIndex: 'descr'
|
||||
}
|
||||
]
|
||||
|
@ -37,7 +37,7 @@ Ext.define('PVE.node.APT', {
|
||||
var colspan = headerCt.getColumnCount();
|
||||
// Usually you would style the my-body-class in CSS file
|
||||
return {
|
||||
rowBody: '<div style="padding: 1em">' + data.Description + '</div>',
|
||||
rowBody: '<div style="padding: 1em">' + Ext.String.htmlEncode(data.Description) + '</div>',
|
||||
rowBodyColspan: colspan
|
||||
};
|
||||
}
|
||||
|
@ -129,6 +129,7 @@ Ext.define('PVE.node.ServiceView', {
|
||||
{
|
||||
header: gettext('Description'),
|
||||
dataIndex: 'desc',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
flex: 1
|
||||
}
|
||||
],
|
||||
|
@ -148,7 +148,7 @@ Ext.define('PVE.IPSetList', {
|
||||
selModel: sm,
|
||||
columns: [
|
||||
{ header: 'IPSet', dataIndex: 'name', width: 100 },
|
||||
{ header: gettext('Comment'), dataIndex: 'comment', flex: 1 }
|
||||
{ header: gettext('Comment'), dataIndex: 'comment', renderer: Ext.String.htmlEncode, flex: 1 }
|
||||
],
|
||||
listeners: {
|
||||
itemdblclick: run_editor,
|
||||
|
@ -13,6 +13,7 @@ Ext.define('PVE.pool.StatusView', {
|
||||
var rows = {
|
||||
comment: {
|
||||
header: gettext('Comment'),
|
||||
renderer: Ext.String.htmlEncode,
|
||||
required: true
|
||||
}
|
||||
};
|
||||
|
@ -253,6 +253,7 @@ Ext.define('PVE.qemu.Options', {
|
||||
smbios1: {
|
||||
header: gettext('SMBIOS settings (type1)'),
|
||||
defaultValue: '',
|
||||
renderer: Ext.String.htmlEncode,
|
||||
editor: caps.vms['VM.Config.HWType'] ? 'PVE.qemu.Smbios1Edit' : undefined
|
||||
}
|
||||
};
|
||||
|
@ -279,7 +279,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
|
||||
if (record.data.name === 'current') {
|
||||
return gettext("You are here!");
|
||||
} else {
|
||||
return value;
|
||||
return Ext.String.htmlEncode(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ Ext.define('PVE.grid.TemplateSelector', {
|
||||
{
|
||||
header: gettext('Description'),
|
||||
flex: 1.5,
|
||||
renderer: Ext.String.htmlEncode,
|
||||
dataIndex: 'headline'
|
||||
}
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user