Steps to replicate the issue (include links if applicable):
- Install MediaWiki 1.42 and Extension:Interwiki, and Skin:Citizen to reproduce the bug
- Go to Special:Interwiki/add and add "example" as the prefix and "https://example.com/#$1 " as the URL
- Add "[[example:test]]" to a page
- Render said page using the Citizen skin
What happens?:
The URL points to https://example.com/#test%20
What should have happened instead?:
The URL should've pointed to https://example.com/#test
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
- MediaWiki: 1.42.1 (a821a11) 07:39, 12 September 2024
- PHP: 8.1.20 (fpm-fcgi)
- Citizen: 2.29.0 (e3f159a) 05:51, 13 September 2024
- Interwiki: 3.2 (9e4e73f) 06:11, 29 August 2024
Other information (browser name/version, screenshots, etc.):
Other skins do also reproduce the trailing space, but it's a literal space instead of a percent-encoded one, and thus, the bug is practically invisible on them.