mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-04-29 02:41:04 +00:00
ui: add some missing htmlEncode
s
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
This commit is contained in:
parent
c34c541820
commit
98cbec545f
@ -1003,15 +1003,18 @@ Ext.define('PVE.Utils', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
render_storage_content: function(value, metaData, record) {
|
render_storage_content: function(value, metaData, record) {
|
||||||
var data = record.data;
|
let data = record.data;
|
||||||
|
let result;
|
||||||
if (Ext.isNumber(data.channel) &&
|
if (Ext.isNumber(data.channel) &&
|
||||||
Ext.isNumber(data.id) &&
|
Ext.isNumber(data.id) &&
|
||||||
Ext.isNumber(data.lun)) {
|
Ext.isNumber(data.lun)) {
|
||||||
return "CH " +
|
result = "CH " +
|
||||||
Ext.String.leftPad(data.channel, 2, '0') +
|
Ext.String.leftPad(data.channel, 2, '0') +
|
||||||
" ID " + data.id + " LUN " + data.lun;
|
" ID " + data.id + " LUN " + data.lun;
|
||||||
|
} else {
|
||||||
|
result = data.volid.replace(/^.*?:(.*?\/)?/, '');
|
||||||
}
|
}
|
||||||
return data.volid.replace(/^.*?:(.*?\/)?/, '');
|
return Ext.String.htmlEncode(result);
|
||||||
},
|
},
|
||||||
|
|
||||||
render_serverity: function(value) {
|
render_serverity: function(value) {
|
||||||
|
@ -249,6 +249,7 @@ Ext.define('PVE.dc.BackupInfo', {
|
|||||||
xtype: 'displayfield',
|
xtype: 'displayfield',
|
||||||
name: 'comment',
|
name: 'comment',
|
||||||
fieldLabel: gettext('Comment'),
|
fieldLabel: gettext('Comment'),
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'fieldset',
|
xtype: 'fieldset',
|
||||||
|
@ -98,7 +98,7 @@ Ext.define('PVE.dc.PCIMapView', {
|
|||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
renderer: function(value, _meta, record) {
|
renderer: function(value, _meta, record) {
|
||||||
return value ?? record.data.comment;
|
return Ext.String.htmlEncode(value ?? record.data.comment);
|
||||||
},
|
},
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
|
@ -90,7 +90,7 @@ Ext.define('PVE.dc.USBMapView', {
|
|||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
renderer: function(value, _meta, record) {
|
renderer: function(value, _meta, record) {
|
||||||
return value ?? record.data.comment;
|
return Ext.String.htmlEncode(value ?? record.data.comment);
|
||||||
},
|
},
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
|
@ -40,6 +40,7 @@ Ext.define('PVE.form.PCIMapSelector', {
|
|||||||
header: gettext('Description'),
|
header: gettext('Description'),
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: gettext('Status'),
|
header: gettext('Status'),
|
||||||
|
@ -64,6 +64,7 @@ Ext.define('PVE.form.USBMapSelector', {
|
|||||||
header: gettext('Comment'),
|
header: gettext('Comment'),
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
renderer: Ext.String.htmlEncode,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -214,7 +214,7 @@ Ext.define('PVE.qemu.CloudInit', {
|
|||||||
],
|
],
|
||||||
} : undefined,
|
} : undefined,
|
||||||
renderer: function(value) {
|
renderer: function(value) {
|
||||||
return value || Proxmox.Utils.defaultText;
|
return Ext.String.htmlEncode(value || Proxmox.Utils.defaultText);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cipassword: {
|
cipassword: {
|
||||||
@ -236,7 +236,7 @@ Ext.define('PVE.qemu.CloudInit', {
|
|||||||
],
|
],
|
||||||
} : undefined,
|
} : undefined,
|
||||||
renderer: function(value) {
|
renderer: function(value) {
|
||||||
return value || Proxmox.Utils.noneText;
|
return Ext.String.htmlEncode(value || Proxmox.Utils.noneText);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
searchdomain: {
|
searchdomain: {
|
||||||
|
Loading…
Reference in New Issue
Block a user