Steps to replicate the issue (include links if applicable):
- Open https://en.wikipedia.org/w/api.php?action=query&format=json&prop=redirects&rdlimit=max&rdnamespace=0&rdprop=title|fragment&redirects=true&formatversion=2&titles=Nairobi
- Look at a redirect like Crime in Nairobi (title) available at https://en.wikipedia.org/w/index.php?title=Crime_in_Nairobi&action=edit
- It should redirect to Crime_and_law_enforcement fragment
What happens?:
fragment value is Crime and law enforcement
What should have happened instead?:
fragment should be Crime_and_law_enforcement
Other information:
It looks like something is transforming the fragment id to something which looks like a title. I see no reason this should be a title, since it is a fragment, hence the id of some HTML element.
But I might miss a good reason to do so.