Signed-off-by: Fabian Ebner <f.eb...@proxmox.com> --- www/manager6/Utils.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 4611ff0f..08778f5c 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -1784,6 +1784,22 @@ Ext.define('PVE.Utils', { return undefined; }, + + escapeNotesTemplate: function(value) { + let replace = { + '\\': '\\\\', + '\n': '\\n', + }; + return value.replace(/(\\|[\n])/g, match => replace[match]); + }, + + unEscapeNotesTemplate: function(value) { + let replace = { + '\\\\': '\\', + '\\n': '\n', + }; + return value.replace(/(\\\\|\\n)/g, match => replace[match]); + }, }, singleton: true, -- 2.30.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel