Page MenuHomePhabricator

Internal link shortcuts strip part between brackets for users.
Open, Needs TriagePublic

Description

In wikitekst, you can create a ahortcut like [[Groningen (provincie)|]] that will then create a linktext without the brackets. This also works for users, but different, so [[User:Akoopal|]] creates a linktext with Akoopal.

However, I discovered these two will be combined as well, see the following test: https://nl.wikipedia.org/w/index.php?title=Gebruiker:Akoopal/Kladblok&diff=56862981&oldid=55272598

I created that link with [[Gebruiker:Mar(c)|]] (Gebruiker is User in Dutch). I don't think this is wanted, and if an internal link is to the user space, it shouldn't strip the brackets anymore, at least I can't think of a reason where this is wante.d

Event Timeline

Akoopal created this task.Aug 4 2020, 4:41 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 4 2020, 4:41 PM
Marc added a subscriber: Marc.EditedAug 4 2020, 5:53 PM

(Because I'm mentioned here )
I'm aware of this since probably the early days of my wiki career, and always thought of it as a funny side effect of the pipe trick. I'm actually surprized it doesn't happen more often when people mention me, ending up shortening my username to "Mar" ([[Gebruiker:Mar(c)|Mar]]) — it happened two days ago, I don't remember any previous instance.

I read today that the pipe trick working at both ends (i.e. namespace as well as disambiguation part) is officially documented; en:Help:Pipe trick mentions "[[Wikipedia:Manual of Style (Persian)|]] produces: Manual of Style". I'm not sure if some namespaces need to be excluded, as Akoopal suggests. (There's the obvious group of users with their usernames ending with "(WMF)"; I don't know whether it's desired/undesired to have that part stripped from the link label by the pipe trick.)

With the pipe trick hard-coded in the wikisoftware, I wonder if there's any situation in which removing the parenthesized part of the link title when there's no space in front of the opening parenthesis is actually desired. (I can imagine some logographic script which doesn't use spaces as much as alphabetic scripts could be a valid case, do some such wiki projects exist?)

With kind regards, Mar. ;-)

Marc added a comment.Aug 4 2020, 7:54 PM

Some examples in article space (so not with a namespace prefix), where the parenthesized part is really a part of the subject's name:

I.m.o. there shouldn't be anything stripped (by default) in these links' labels. Of course, as with page titles containing a comma, if the parenthesized term (or the comma, plus what follows) is really a part of the article subject's name, and the editor doesn't want it to get stripped off, then s/he just shouldn't enter a pipe. I couldn't find any picnic/pebcak tag to add to this ticket, so if in (almost) all cases of page titles that end with [non-space](parenthesized term) the parenthesized term is part of the subject's name —also on other (e.g. non-alphabetic script?) projects— I guess this could better be excluded from the pipe trick.

RonnieV added a subscriber: RonnieV.Aug 6 2020, 4:24 PM

Maybe not everyone is aware of this pipe trick, maybe everyone else is even more into previewing what the result of their edit is than I am. In the Dutch community, there are six usernames with a ( in it. Four of them have a space before it, two not. Of these four, three are ' (WMF)'.