mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-09 14:37:56 +00:00
add htmlEncode to various fields
add htmlEnode as a renderer to fields which lets you input arbitrary strings, to prevent html tags Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
bda8855a5b
commit
3095fb1d08
@ -132,6 +132,7 @@ Ext.define('PVE.dc.AuthView', {
|
|||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
sortable: false,
|
sortable: false,
|
||||||
dataIndex: 'comment',
|
dataIndex: 'comment',
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -95,6 +95,7 @@ Ext.define('PVE.dc.GroupView', {
|
|||||||
{
|
{
|
||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
sortable: false,
|
sortable: false,
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
dataIndex: 'comment',
|
dataIndex: 'comment',
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,7 @@ Ext.define('PVE.dc.PoolView', {
|
|||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
sortable: false,
|
sortable: false,
|
||||||
dataIndex: 'comment',
|
dataIndex: 'comment',
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -167,7 +167,7 @@ Ext.define('PVE.SecurityGroupList', {
|
|||||||
selModel: sm,
|
selModel: sm,
|
||||||
columns: [
|
columns: [
|
||||||
{ header: gettext('Group'), dataIndex: 'group', width: 100 },
|
{ 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: {
|
listeners: {
|
||||||
itemdblclick: run_editor,
|
itemdblclick: run_editor,
|
||||||
|
@ -220,6 +220,7 @@ Ext.define('PVE.dc.UserView', {
|
|||||||
id: 'comment',
|
id: 'comment',
|
||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
sortable: false,
|
sortable: false,
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
dataIndex: 'comment',
|
dataIndex: 'comment',
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ Ext.define('PVE.FirewallAliases', {
|
|||||||
columns: [
|
columns: [
|
||||||
{ header: gettext('Name'), dataIndex: 'name', width: 100 },
|
{ header: gettext('Name'), dataIndex: 'name', width: 100 },
|
||||||
{ header: gettext('IP/CIDR'), dataIndex: 'cidr', 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: {
|
listeners: {
|
||||||
itemdblclick: run_editor
|
itemdblclick: run_editor
|
||||||
|
@ -108,7 +108,8 @@ Ext.define('PVE.ha.GroupsView', {
|
|||||||
{
|
{
|
||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
flex: 1,
|
flex: 1,
|
||||||
dataIndex: 'comment'
|
dataIndex: 'comment',
|
||||||
|
renderer: Ext.String.htmlEncode
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
listeners: {
|
listeners: {
|
||||||
|
@ -133,7 +133,8 @@ Ext.define('PVE.ha.ResourcesView', {
|
|||||||
{
|
{
|
||||||
header: gettext('Description'),
|
header: gettext('Description'),
|
||||||
flex: 1,
|
flex: 1,
|
||||||
dataIndex: 'comment'
|
dataIndex: 'comment',
|
||||||
|
renderer: Ext.String.htmlEncode
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
listeners: {
|
listeners: {
|
||||||
|
@ -279,7 +279,7 @@ Ext.define('PVE.lxc.SnapshotTree', {
|
|||||||
if (record.data.name === 'current') {
|
if (record.data.name === 'current') {
|
||||||
return gettext("You are here!");
|
return gettext("You are here!");
|
||||||
} else {
|
} else {
|
||||||
return value;
|
return Ext.String.htmlEncode(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ Ext.define('PVE.IPSetList', {
|
|||||||
selModel: sm,
|
selModel: sm,
|
||||||
columns: [
|
columns: [
|
||||||
{ header: 'IPSet', dataIndex: 'name', width: 100 },
|
{ 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: {
|
listeners: {
|
||||||
itemdblclick: run_editor,
|
itemdblclick: run_editor,
|
||||||
|
@ -13,6 +13,7 @@ Ext.define('PVE.pool.StatusView', {
|
|||||||
var rows = {
|
var rows = {
|
||||||
comment: {
|
comment: {
|
||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -242,6 +242,7 @@ Ext.define('PVE.qemu.Options', {
|
|||||||
smbios1: {
|
smbios1: {
|
||||||
header: gettext('SMBIOS settings (type1)'),
|
header: gettext('SMBIOS settings (type1)'),
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
editor: caps.vms['VM.Config.HWType'] ? 'PVE.qemu.Smbios1Edit' : undefined
|
editor: caps.vms['VM.Config.HWType'] ? 'PVE.qemu.Smbios1Edit' : undefined
|
||||||
},
|
},
|
||||||
agent: {
|
agent: {
|
||||||
|
@ -279,7 +279,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
|
|||||||
if (record.data.name === 'current') {
|
if (record.data.name === 'current') {
|
||||||
return gettext("You are here!");
|
return gettext("You are here!");
|
||||||
} else {
|
} else {
|
||||||
return value;
|
return Ext.String.htmlEncode(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user