Page MenuHomePhabricator

Links with forbidden characters
Closed, InvalidPublic

Description

The MediaWiki do not allow use some characters in article titles for technical reasons, precisely from this regular expression .*[?&]+[^=]+=[^&]+.*

Although articles titles with these characters are forbidden, they are allowed in internal links, for example, [[?curid=1234]] will link to the article with curid 1234, and despite this will work, it will have a red link, because no article with this title exists. I think it is useful, I linked a diff once in this way in a summary edit at pt.wikipedia.org/w/index.php?title=Igreja_Universal_do_Reino_de_Deus&diff=prev&oldid=4180672 and also in my sandbox at pt.wikipedia.org/w/index.php?title=Usuário:Luizdl/Testes&oldid=41829286

These kind of link could be useful, it obviously is a bug just because it has a red link, also, the link created has the parameter action=edit, and these links only work because it also pass the parameter redlink=1 which makes the article don't enter in edit mode because "article exists". I think one of two things could be done on this issue, or make internal links with these character don't work, or make them have a blue link.

Event Timeline

Luizdl raised the priority of this task from to Needs Triage.
Luizdl updated the task description. (Show Details)
Luizdl added a project: MediaWiki-Action-API.
Luizdl subscribed.
Anomie claimed this task.
Anomie subscribed.

This has nothing to do with the API. And as far as I can understand what it's trying to say it is not even correct in it basic assumption since pages like ? and = do in fact exist

What I am saying is when we use [[?oldid=4180672]] it has red link, but when clicked it goes to the page.

Just like any other redlink.

But now I see where you probably got that regular expression from. A title matching a title blacklist entry doesn't mean MediaWiki disallows those titles, it just means that admins on the local wiki have blacklisted the title as unlikely to be useful.

Any other redlink when clicked it enter in edit mode for create the article, but when [[?oldid=41829286]] redlink is clicked, to goes to the oldid number 41829286 in view mode.