Page MenuHomePhabricator

Section titles containing a question mark should be URL encoded in table of contents links
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

What should have happened instead?:

image.png (442×1 px, 47 KB)

  • Oh, this is happening on Phabricator too. See above.

image.png (131×1 px, 24 KB)

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

I misread, I thought the linked ticket T95473 was resolved, in reality it's still open.

I'll still leave this one open though, since that one is about interwiki links, and this one is about regular wikilinks.

@Novem_Linguae can you assist me on how the links are being converted and which section to look out for, as on searching I figured out the parser class is responsible for converting syntax to html if that's right?

Not sure. I'd have to dig into the code.

A good approach to this ticket might be to add a parser test to mediawiki/tests/parser/* somewhere that is something like...

!! test
URL-encode punctuation in hyperlinks (T326365)
!! wikitext
__TOC__

== Test? ==
!! html
paste the current parser output, then tweak the question mark in the TOC <a href=""> to be %3F instead of ?
!! end

Then start tweaking the parser code until the test passes.

See also T50940 for the same problem, but with page titles.