Steps to replicate the issue (include links if applicable):
- Visit https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=1131823690
- In the table of contents, click on "Styling for the TW menu gone?"
- Look at URL
What happens?:
What should have happened instead?:
- URL should be https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=1131823690#Styling_for_the_TW_menu_gone%3F
- This prevents bugs when the punctuation is at the end of the section title and then pasting the URL into other websites that try to auto create a link. The auto creation algorithms will usually treat ? . ! and other punctuation at the end of a URL as the end of the sentence, and not include it in the link, but in this case it should be included, and we can force that inclusion by URL encoding, e.g. %3F
- Example from GitHub below. Notice the white question mark, which should be blue.
- Oh, this is happening on Phabricator too. See above.
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
- Related but not identical (since it is dealing with interwiki links, not regular wikilinks): T95473: Interwiki links whose titles contain question marks are not properly escaped in HTML output.
- May want to test and see if this is also a problem for other common sentence ending punctuation, such as period and exclamation mark