]> git.proxmox.com Git - pve-common.git/commitdiff
print defaulttxt as sprintf parameter
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 6 Jun 2019 09:03:56 +0000 (11:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Jun 2019 09:29:19 +0000 (11:29 +0200)
instead of having it verbatim in the format string.
This enables us to have '%' in the defaulttext without getting errors

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/RESTHandler.pm

index 49d43b94593c2f802b336271033d4df962024dea..75d5d2e6dcfc5460ecc8524b8dc505005b4340c2 100644 (file)
@@ -538,7 +538,7 @@ my $get_property_description = sub {
            die "unknown style '$style'";
        }
 
            die "unknown style '$style'";
        }
 
-       my $tmp = sprintf "  %-10s %s$defaulttxt\n", $display_name, "$type_text";
+       my $tmp = sprintf "  %-10s %s%s\n", $display_name, "$type_text", "$defaulttxt";
        my $indend = "             ";
 
        $res .= Text::Wrap::wrap('', $indend, ($tmp));
        my $indend = "             ";
 
        $res .= Text::Wrap::wrap('', $indend, ($tmp));