Steps to replicate the issue (include links if applicable):
- Go to Special:RestSandbox
- Expand /v1/page/{title}/bare
- Click “Try it out”
- Enter Main_Page (or Main Page) as the title
- Click “Execute”
Or directly load https://en.wikipedia.org/w/rest.php/v1/page/Main_Page/bare.
What happens?:
The response JSON includes the field:
"html_url": "https://en.wikipedia.org/w/rest.php/v1/page/Main%20Page/html"
This URL is not normalized and will return a redirect if requested.
What should have happened instead?:
It should return the normalized form of the URL (the one that the other URL redirects to):
"html_url": "https://en.wikipedia.org/w/rest.php/v1/page/Main_Page/html"