acme: plugin: add htmlEncodes

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:
Friedrich Weber 2025-01-15 14:49:39 +01:00 committed by Fabian Grünbichler
parent f26346a597
commit 88d62e5386

View File

@ -95,14 +95,14 @@ Ext.define('Proxmox.window.ACMEPluginEdit', {
let field = Ext.create({
xtype,
name: `custom_${name}`,
fieldLabel: label,
fieldLabel: Ext.htmlEncode(label),
width: '100%',
labelWidth: 150,
labelSeparator: '=',
emptyText: definition.default || '',
autoEl: definition.description ? {
tag: 'div',
'data-qtip': definition.description,
'data-qtip': Ext.htmlEncode(Ext.htmlEncode(definition.description)),
} : undefined,
});