Skip to content

Commit

Permalink
Fix incorrect query string for w3mman 7z
Browse files Browse the repository at this point in the history
Bug-Debian: #191
  • Loading branch information
tats committed Aug 30, 2021
1 parent 0fb72f7 commit b71c5ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/w3mman/w3mman.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ while (@ARGV) {
$query .= "&pwd=" . &form_encode($ENV{'PWD'});
} elsif (/^-/) {
&usage();
} elsif (/^\d/ || $_ eq 'n' || $_ eq 'l') {
} elsif ($query !~ /&section=/ && (/^\d/ || $_ eq 'n' || $_ eq 'l')) {
if ( $query eq "" ) { $query = "?quit=ok"; }
$query .= "&section=" . &form_encode($_);
} else {
if ( $query eq "" ) { $query = "?quit=ok"; }
$query .= "&man=" . &form_encode($_);
}
}
if ($query =~ /&section=/ && $query !~ /&keyword=/ && $query !~ /&man=/) {
$query =~ s/&section=/&man=/;
}

exec @W3M, "$SCRIPT$query";

Expand Down

0 comments on commit b71c5ec

Please sign in to comment.