On 02/04/2025 12:04, Gabriel Goller wrote: > On 02.04.2025 11:26, Friedrich Weber wrote: >>> + commonColumns: [ >>> + { >>> + text: gettext('Status'), >>> + dataIndex: 'status', >>> + width: 30, >>> + renderer: function(value, metaData, record) { >>> + let icon = record.data.statusIcon || ''; >>> + let tooltip = record.data.statusTooltip || ''; >>> + >>> + if (tooltip) { >>> + metaData.tdAttr = 'data-qtip="' + Ext.htmlEncode(tooltip) + >>> '"'; >>> + } >> >> Tooltips need to be double-encoded [1], so one htmlEncode might be missing >> here. >> >> [1] >> https://git.proxmox.com/?p=pve-manager.git;a=commit;h=f08f08a042cec0124f73199dcda0d8f882e14507 > > Ah, so: > > metaData.tdAttr = 'data-qtip="' + Ext.htmlEncode(Ext.htmlEncode(tooltip)) > + '"'; > > ?
As long as `tooltip` isn't supposed to contain HTML and if I recall correctly, yes. ... and nit: While at it, this could use string interpolation to make it more readable :) > Thanks for the review! Sure! _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel