Page MenuHomePhabricator

fullurl: works incorrectly if the page name has a semi-colon
Open, Needs TriagePublicBUG REPORT

Description

Hi. There is a link in a system message that doesn't work on some conditions.

  • Open this page.
  • Find the "A checked version of this page, approved on 3 July 2016, was based on this revision." message on the top.
  • Click on the "checked version" link.
  • Expected: go to an other version page.
  • Got: "no such page" error, with irrelevant page name.

Thank you.


See the code of https://ru.wikipedia.org/wiki/MediaWiki:Revreview-basic-source

Pages with ; (semicolon) in them don’t get correct {{fullurl:}} link.

Event Timeline

stjn renamed this task from Aporoved version system message broken to fullurl: works incorrectly if the page name has ;.Mar 10 2024, 12:34 PM
stjn renamed this task from fullurl: works incorrectly if the page name has ; to fullurl: works incorrectly if the page name has a semi-colon.
stjn updated the task description. (Show Details)
stjn edited projects, added MediaWiki-Parser; removed MediaWiki-extensions-FlaggedRevs.
stjn updated the task description. (Show Details)
IKhitron updated the task description. (Show Details)

The url is https://ru.wikipedia.org/w/index.php?title=%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F:%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%A1%D1%82%D0%B0%D1%82%D1%8C%D0%B8_%D0%B1%D0%B5%D0%B7_%D0%B8%D1%81%D1%82%D0%BE%D1%87%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2_(%D1%82%D0%B8%D0%BF:_%D1%87%D0%B5%D0%BB%D0%BE%D0%B2%D0%B5%D0%BA%26&stableid=79331611#59;_%D1%80%D0%BE%D0%B4_%D0%B7%D0%B0%D0%BD%D1%8F%D1%82%D0%B8%D0%B9:_%D0%B1%D0%B8%D0%BE%D1%85%D0%B8%D0%BC%D0%B8%D0%BA)

The ; gets escaped (via wfEscapeWikiText) to &#59; and # starts an anchor, so the text is at the end of the url, giving a broken url.

This kind of escaping is similiar to what happens in T358338

The ; gets escaped (via wfEscapeWikiText)

What calls wfEscapeWikiText? If I write {{fullurl:{{FULLPAGENAMEE}}}}, I want to see no HTML escapes, only URL escapes. If semicolons are escaped, they should be escaped as %3B, not as &#59;.

That’s quite long ago. 🙁 I wish it would be fixed (by using URL escapes), but who knows how many templates were built around this buggy behaviour in the past thirteen years…

That’s quite long ago. 🙁 I wish it would be fixed (by using URL escapes), but who knows how many templates were built around this buggy behaviour in the past thirteen years…

Ehh. Not sure this should be a justification for keeping the bug in, though. If someone used this buggy behaviour in their templates, let them fix those templates. Should be simple (with wikitext or Lua).

Not sure this should be a justification for keeping the bug in, though.

I’m not sure either. If it’s fixed, it should definitely get a User-notice, on the Monday before it’s deployed or a week earlier, so that people know what broke their templates by the time it breaks them (and even have time to fix them in advance).