mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-22 02:14:04 +00:00
apt: add missing htmlEncode to qtip
to avoid interpreting html tags in the values. When setting a tooltip via the `data-qtip` attribute, the contents needs to be double-encoded. Ext.js internally uses `innerHTML` to apply the generated HTML, which undoes one layer of encoding in case of `data-qtip`. Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
This commit is contained in:
parent
9d5d6a7815
commit
f26346a597
@ -270,7 +270,7 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
||||
let txt = [gettext('Warning')];
|
||||
record.data.warnings.forEach((warning) => {
|
||||
if (warning.property === 'Suites') {
|
||||
txt.push(warning.message);
|
||||
txt.push(Ext.htmlEncode(warning.message));
|
||||
}
|
||||
});
|
||||
metaData.tdAttr = `data-qtip="${Ext.htmlEncode(txt.join('<br>'))}"`;
|
||||
@ -305,7 +305,7 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
|
||||
? gettext('The no-subscription repository is NOT production-ready')
|
||||
: gettext('The test repository may contain unstable updates')
|
||||
;
|
||||
metaData.tdAttr = `data-qtip="${Ext.htmlEncode(qtip)}"`;
|
||||
metaData.tdAttr = `data-qtip="${Ext.htmlEncode(Ext.htmlEncode(qtip))}"`;
|
||||
}
|
||||
}
|
||||
return components.join(' ') + err;
|
||||
|
Loading…
Reference in New Issue
Block a user