Steps to replicate the issue (include links if applicable):
- Use the browser of a mobile device or set your skin to Minerva
- Navigate to a page containing wikitext such as the following (example at testwiki:Ref name containing hash sign breaks popup on mobile):
a<ref name="normal">foo</ref> b<ref name="#broken">bar</ref>
- Click or tap on both reference footnotes
What happens?:
The reference popup shows for the first ref, but not for the second. An error message appears in the browser console:
What should have happened instead?:
The reference popup should show for both refs.
Other information (browser name/version, screenshots, etc.):
Reproduced with Firefox 110 and Edge 110.
Seems to be caused by resources/skins.minerva.scripts/references.js line 28 ff. Setting a breakpoint there and manually fixing the value of the href variable causes the popup to appear.
Implementation
- there is a solution for blank spaces in ref names already, follow that pattern here as well