mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-02 23:07:09 +00:00
parser: sanitize HTML: allow 'disabled', 'start', 'type' and 'checked' attributes
This makes check box lists like the following snipped work: - [X] Done - [ ] not done Further allow the start attr, sometimes generated for ordered lists. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d1c4a7389f
commit
a610dd9e32
@ -20,7 +20,7 @@ Ext.define('Proxmox.Markdown', {
|
||||
for (let i=node.attributes.length; i--;) {
|
||||
const name = node.attributes[i].name;
|
||||
// TODO: we may want to also disallow class and id attrs
|
||||
if (!/^(class|id|name|href|src|alt|align|valign)$/i.test(name)) {
|
||||
if (!/^(class|id|name|href|src|alt|align|valign|disabled|checked|start|type)$/i.test(name)) {
|
||||
node.attributes.removeNamedItem(name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user