This commit is contained in:
Jamie Cameron
2015-03-27 15:06:42 -07:00
parent f455c24054
commit b7b6624ee8
3 changed files with 6 additions and 2 deletions

View File

@@ -1407,8 +1407,8 @@ sub extract_input
local ($cmd) = @_;
$cmd =~ s/\\%/\0/g;
local ($cmd, $input) = split(/\%/, $cmd, 2);
$cmd =~ s/\0/%/g;
$input =~ s/\0/%/g;
$cmd =~ s/\0/\\%/g;
$input =~ s/\0/\\%/g;
return ($cmd, $input);
}

View File

@@ -79,6 +79,8 @@ else {
&convert_range($job);
$rangeable = 1;
($command, $input) = &extract_input($job->{'command'});
$command =~ s/\\%/%/g;
$input =~ s/\\%/%/g;
@lines = split(/%/, $input);
print &ui_table_row($text{'edit_command'},
&ui_textbox("cmd", $command, 60));

View File

@@ -122,6 +122,8 @@ foreach $u (@ulist) {
local $max = $config{'max_len'} || 10000;
local ($cmd, $input) =
&extract_input($job->{'command'});
$cmd =~ s/\\%/%/g;
$input =~ s/\\%/%/g;
$cmd = length($cmd) > $max ?
&html_escape(substr($cmd, 0, $max))." ..." :
$cmd !~ /\S/ ? "BLANK" : &html_escape($cmd);