[pve-devel] [PATCH v4 manager 6/7] ui: dc/backup: (un)escape notes-template
Fabian Ebner
f.ebner at proxmox.com
Wed Apr 27 17:41:15 CEST 2022
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
Technically should come earlier, but I didn't want to write a
second version for before Thomas's patch and rebase after.
www/manager6/dc/Backup.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index df4a70fd..b081be8c 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -384,6 +384,13 @@ Ext.define('PVE.dc.BackupEdit', {
type: 'vbox',
align: 'stretch',
},
+ onGetValues: function(values) {
+ if (values['notes-template']) {
+ values['notes-template'] = PVE.Utils.escapeNotesTemplate(
+ values['notes-template']);
+ }
+ return values;
+ },
items: [
{
xtype: 'textarea',
@@ -453,6 +460,11 @@ Ext.define('PVE.dc.BackupEdit', {
delete data.maxfiles;
}
+ if (data['notes-template']) {
+ data['notes-template'] = PVE.Utils.unEscapeNotesTemplate(
+ data['notes-template']);
+ }
+
me.setValues(data);
},
});
--
2.30.2
More information about the pve-devel
mailing list