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

Percent-encoded slashes are not respected #7

Open
MusikAnimal opened this issue Apr 25, 2020 · 0 comments
Open

Percent-encoded slashes are not respected #7

MusikAnimal opened this issue Apr 25, 2020 · 0 comments

Comments

@MusikAnimal
Copy link

The WikiWho API doesn't respect percent-encoded slashes. This is a problem when a page title ends with a slash followed by a number, since WikiWho interprets the number to be a revision ID.

For example Heuschreckenplage 2019/2020 on German Wikipedia:

https://api.wikiwho.net/en/api/v1.0.0-beta/rev_content/Heuschreckenplage_2019/2020/?o_rev_id=true&editor=true&token_id=false&out=false&in=false
https://api.wikiwho.net/en/api/v1.0.0-beta/rev_content/Heuschreckenplage_2019%2F2020/?o_rev_id=true&editor=true&token_id=false&out=false&in=false

The former understandably wouldn't work since this matches the URI scheme for getting data for a particular revision (revision ID 2020 in this case). The latter encodes the slash but WikiWho still chops off the number, hence why you get the error that "Heuschreckenplage 2019" doesn't exist.

This causes XTools to fail too, e.g. https://xtools.wmflabs.org/articleinfo-authorship/de.wikipedia.org/Heuschreckenplage_2019/2020. Downstream bug report at https://phabricator.wikimedia.org/T250489

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

1 participant