Currently `Special:SetAliases` provides one field to enter aliases and tells the user to split them with a `|` character. And there's no way to tell it to keep a `|` character as part of an alias.**Problem**
Item`Special:SetAliases` pages,e does not allow the user to enter an alias that contains a `|` character in it's text. howeverThis is because the current page has only one field that instructs the user to enter the list of aliases, would allow entering an alias that containand split them with a `|` character.
After checking some of the existing cases (through query service and in `wb_terms`), they all seemed to be non-legitimate (looks like entered by mistake, a bot that is sending them in one string, some including code-like string that contains a pipe ..Since a `|` character might have legitimate use-cases, etc).
After checking with Productbeing part of the alias text, esp. regarding the side-effect on summary messages when users try to edit aliases of an item that already have some aliases containing a | (they will be split), that side-effect seem to be a minor thing on those cases.
To avoid skipping any legitimate reason to allow | for some languages, we plan is to announce this as breaking change in order to receive feedback in case anyone has legitimate reasons to ask for allowing | characters in aliases.
---such as in the following:
https://www.wikidata.org/wiki/Q1161179 "Mac|Life"
https://www.wikidata.org/wiki/Q1753348 "M|A|R|R|S"
[**previous task description - kept for history**]we have to find a way to allow the user to use `|`s in aliases when they edit them through `Special:SetAliases` page.
Currently when using Special:SetAliases to edit a list of aliases that include individual aliases that have a | in them destructive edits happen.**Suggested Solutions**
Example:* make `Special:SetAliases` fail when there's already one or more alias on the item that contain a `|`. This can be done anyway as first iteration, then followed up by one of the following.
Edit throguh the JS UI creating some aliases: https://test.wikidata.org/w/index.php?title=Q214&diff=prev&oldid=489761* provide the user with a sensible way to continue splitting aliases using `|`s, but to escape those that must be part of the alias text. (for example, they can escape a pipe by a pipe `||` or a backslash `\|`)
Destructive edit via the special page (the user didn't actually set anything): https://test.wikidata.org/w/index.php?title=Q214&diff=next&oldid=489761
As a bare minimum requirement the special page should detect when | characters exist in individual aliases and refuse to make the edit* use the TagMultiselectWidget from OOUI: https://doc.wikimedia.org/oojs-ui/master/demos/?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop. (note: that does not work without JavaScript)
* add a new special page `Special:AddAlias` that adds one alias at a time (can have "add another" checkbox to redirect to it again).
I'm sure we could also think of something better however.
At the end of last year there were 56k aliases with the | character in them.