Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

w3mman incorrect query string #191

Closed
memreflect opened this issue Aug 29, 2021 · 1 comment
Closed

w3mman incorrect query string #191

memreflect opened this issue Aug 29, 2021 · 1 comment

Comments

@memreflect
Copy link
Contributor

w3mman 7z fails because it generates ?quit=ok&section=7z.
w3mman 1 7z generates ?quit=ok&section=1&section=7z.
w3mman foo bar incorrectly generates ?quit=ok&man=foo&man=bar.

Since the syntax is [[section] page], this is incorrect. One possible fix is to use Getopt::Std, which has been standard since the early days of Perl 5. Another alternative is to limit the number of sections to 1 (e.g. /^\d/ || ...$query !~ /&section=/ && (/^\d || ...) will fix the w3mman 1 7z case) and to detect an incorrectly generated query string after the loop (i.e. ?quit=ok&section=7z should be changed into ?quit=ok&man=7z).

@memreflect memreflect changed the title w3mman w3mman incorrect query string Aug 29, 2021
tats added a commit that referenced this issue Aug 30, 2021
@tats
Copy link
Owner

tats commented Aug 30, 2021

Fixed with your suggestion. Thank you.

@tats tats closed this as completed Aug 30, 2021
bptato pushed a commit to bptato/w3m that referenced this issue Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants