Skip to content

Percent-encoded slashes are not respected #7

@MusikAnimal

Description

@MusikAnimal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions