Page MenuHomePhabricator

Whitespace not stripped around sense glosses
Closed, ResolvedPublic

Description

Problem:
Lemmas, Glosses and Representations on a Lexeme do not handle whitespace at the beginning and end of the input correctly. They should be handled in the same way as on Items. Additional whitespace at the beginning or end of input should be stripped before saving. Existing input that is changed to have a whitespace at the beginning or end should leave to the save/publish link staying grayed out.

Currently the input for Lemmas throws an error and the input for Glosses and Representations is accepted as-is.

Acceptance criteria:

  • Input via the API and UI that contains whitespace at the beginning or end of a Lemma, Gloss or Representation is stripped of that whitespace before saving.

Related Objects

Event Timeline

Lydia_Pintscher triaged this task as Normal priority.Dec 21 2018, 4:13 PM
Lydia_Pintscher updated the task description. (Show Details)
Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.
alaa_wmde claimed this task.Feb 4 2019, 4:05 PM

Change 488502 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/WikibaseLexeme@master] lexeme.api: trim leading/trailing whitespaces around glosses and senses

https://gerrit.wikimedia.org/r/488502

Addshore moved this task from ready to go to in progress on the Wikidata board.Feb 7 2019, 3:54 PM
alaa_wmde added a subscriber: Jakob_WMDE.EditedFeb 13 2019, 10:58 PM

@Jakob_WMDE I reverted our decision from today on going for a separate trimmed input component (things seemed off with current SSR and child components) .. more details on gerrit

Change 488502 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] lexeme.api: trim leading/trailing whitespaces around glosses and senses view: trim representation text and lemma value

https://gerrit.wikimedia.org/r/488502

I can't test this atm because https://wikidata.beta.wmflabs.org is locked for edits because of the current beta issues. Maybe I can check it on one of your machines.

@Lydia_Pintscher sure come over whenever you see me on my desk