Page MenuHomePhabricator

Tailing whitspaces in string-values fail with confusing error message
Closed, DuplicatePublic

Description

When I add a statement of type String (or URL) and enter "foo " as value, accidentally with a tailing whitespace (often occures with copy-and-paste) and click save, I get the Error-message Could not save due to an error. Malformed input: foo but the tailing whitespace is not visible, so nothing points me to why the input is malformed.

wikidatabug2.png (170×318 px, 6 KB)

Possible solutions:

  • Remove tailing whitespaces automatically
  • Put the input in Quotationmarks so that the space is getting visible
  • Make spaces visible by formatting characters
  • Detect tailing whitespaces and give an appropriate error-message