]> git.proxmox.com Git - pve-common.git/commitdiff
REST handler: get property description: escape curly braces for asciidoc
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 7 Apr 2022 10:05:38 +0000 (12:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Apr 2022 08:46:43 +0000 (10:46 +0200)
Text enclosed in unescaped curly braces will be interpreted as an
attribute reference breaking and e.g. lead to the description not
showing up at all a generated man page further down the line.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/RESTHandler.pm

index 4f1458be22e4de8dd193aef7270ace909a42a249..c74618151ee4f8beb6f1c9beb0686a54c05ea100 100644 (file)
@@ -517,6 +517,9 @@ my $get_property_description = sub {
        chomp $wdescr;
        $wdescr =~ s/^$/+/mg;
 
+       $wdescr =~ s/{/\\{/g;
+       $wdescr =~ s/}/\\}/g;
+
        $res .= $wdescr . "\n";
 
        if (my $req = $phash->{requires}) {