[pve-devel] [PATCH pve-manager 2/7] fabrics: add common interface panel
Friedrich Weber
f.weber at proxmox.com
Wed Apr 2 12:10:16 CEST 2025
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!
More information about the pve-devel
mailing list