Page MenuHomePhabricator

Trim text input before saving on Wikibase string input
Open, Needs TriagePublic


Trim text input before saving

Steps to reproduce:

  1. Copy a text with leading and/or trailing space(s) into a string based statement (see screenshot)
  2. Paste it in a text field, like "name"
  3. Useless error appears

In this example a leading space in front of "Swiss Ruby"

grafik.png (501×804 px, 16 KB)

Event Timeline

Yes, ran into this too on Wikidata this week. The stripping could happen on the front end javascript or in the backend API. Not sure where other clean up is currently happening. AFAIK this only applies to string datatypes so I'll update the task a bit.

Multichill renamed this task from Trim text input before saving to Trim text input before saving on Wikibase string input.May 2 2020, 11:01 AM
Multichill updated the task description. (Show Details)

Any chance that this could be fixed in the near future? It's really annoying to run into the misleading error "wrong input". As I am an experienced user I know what to do (trim by hand) but other people with less experience would give up :-(

Putting it on my list to discuss with Adam next week.

Open question from my side: how do we deal with statements where the value is supposed to be only a whitespace? (I'm thinking of the Item for the whitespace character for example.)