by setting 'contentEditable' to 'plaintext-only' instead of true.
Otherwise it was possible to paste html code into the field (an error
was thrown by the backend since it does not match the regex)

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 www/manager6/form/Tag.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/manager6/form/Tag.js b/www/manager6/form/Tag.js
index 6b1d6aa5..39afe04b 100644
--- a/www/manager6/form/Tag.js
+++ b/www/manager6/form/Tag.js
@@ -45,7 +45,7 @@ Ext.define('Proxmox.form.Tag', {
     selectText: function(collapseToEnd) {
        let me = this;
        let tagEl = me.tagEl();
-       tagEl.contentEditable = true;
+       tagEl.contentEditable = "plaintext-only";
        let range = document.createRange();
        range.selectNodeContents(tagEl);
        if (collapseToEnd) {
@@ -98,7 +98,7 @@ Ext.define('Proxmox.form.Tag', {
        let me = this;
        let tagEl = me.tagEl();
        if (tagEl) {
-           tagEl.contentEditable = mode === 'editable';
+           tagEl.contentEditable = mode === 'editable' ? 'plaintext-only' : 
false;
        }
        me.removeCls(me.mode);
        me.addCls(mode);
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to