public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: manual backup: unescape notes template on load
Date: Mon, 27 Jun 2022 14:42:42 +0200	[thread overview]
Message-ID: <20220627124242.7541-1-f.ebner@proxmox.com> (raw)

It's escaped in the API result and will be re-escaped upon submit,
leading to confusion as reported in the community forum:
https://forum.proxmox.com/threads/110747/post-480507

Fixes: 2a1f46ed ("ui: manual backup: also set notes-template default")
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 www/manager6/window/Backup.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index 510430c0..4b21c746 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -114,8 +114,9 @@ Ext.define('PVE.window.Backup', {
 				modeSelector.setValue(data.mode);
 			    }
 			    if (!initialDefaults && (data['notes-template'] ?? false)) {
-				me.down('field[name=notes-template]')
-				    .setValue(data['notes-template']);
+				me.down('field[name=notes-template]').setValue(
+				    PVE.Utils.unEscapeNotesTemplate(data['notes-template']),
+				);
 			    }
 
 			    initialDefaults = true;
-- 
2.30.2





             reply	other threads:[~2022-06-27 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 12:42 Fabian Ebner [this message]
2022-06-28 14:10 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220627124242.7541-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal