Page MenuHomePhabricator

All text after a pipe character is silently removed when saving a monolingual text property
Closed, ResolvedPublic

Description

Monolingual text properties do not allow the pipe character as part of the value. The pipe character and everything after it is silently removed when saving.

For example:

Expected result: The value saved is "Test1 | test2"
Actual result: The value saved is "Test1"

If the pipe character is the first character, it fails to save instead, giving the error Must be at least one character long.

String properties do not have this problem.

Event Timeline

I'm mostly having problems with this when adding references. I've been using https://www.wikidata.org/wiki/User:Aude/citoid.js which adds the page title to the reference, but it seems lots of websites have pipes in their page titles. That means I have to choose between not adding a title at all or adding a title which doesn't match the source.

Greta_Doci_WMDE claimed this task.

This bug is fixed. Just tested it and it is shown correctly.