Page MenuHomePhabricator

| (vertical bar) character is not accepted in aliases
Closed, ResolvedPublic

Description

For the article:

https://de.wikipedia.org/wiki/Internationales_Frauenfilmfestival_Dortmund/K%C3%B6ln

There is a vertical bar in the aliases, such as "IFFF Dortmund | Köln". In Wikidata, this gets split into two aliases "IFFF Dortmund" and "Köln".

Sure, the api uses | as a separator but is there a way we can accept them in aliases?


Version: master
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=51811
https://bugzilla.wikimedia.org/show_bug.cgi?id=43134

Details

Reference
bz43136

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:47 AM
bzimport set Reference to bz43136.
bzimport added a subscriber: Unknown Object (MLST).

Aliases is a readable string, I can't really see a usecase for this. Or would this be to split off some part of it?

The only way I see to get around this is to doubly urlencode the alias and then urldecode it in PHP, or to drop the possibility of adding two aliases at the same time (but does the API support this?).

We could encode a limited number of entities if they are part of the aliases, it seems like this is the only place this creates problems. That would make it possible to add literal pipe characters. The other special characters; ampersand, semicolons, hashmarks and question marks, does not seem to create problems.

It would be encoded in the strings before they are sent to the API, and decoded after they are received in the API.

*** Bug 51199 has been marked as a duplicate of this bug. ***

pyfisch wrote:

You can also add multiple aliases at once using the tab key which moves the cursor to the next alias field.

This is no longer an issue.