From ba055afb23b15fb0f87c8e78838615800b8a77ed Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Tue, 3 May 2022 13:17:58 +0200 Subject: [PATCH] vzdump: notes-template: avoid escaping meta-characters upon replace which is caused by the quoting operators \Q...\E. The actual intention was to avoid such surprises. Fixes: 413bb432 ("partially close #438: vzdump: support setting notes-template") Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 22fdb324e..9af2de3dc 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -90,7 +90,7 @@ my $generate_notes = sub { $notes_template =~ s/\\(.)/$unescape->($1)/eg; my $vars = join('|', keys $info->%*); - $notes_template =~ s/\{\{($vars)\}\}/\Q$info->{$1}\E/g; + $notes_template =~ s/\{\{($vars)\}\}/$info->{$1}/g; die "unexpected variable name '$1'" if $notes_template =~ m/\{\{([^\s]+)\}\}/;