Ticket #2485 (new defect)

Opened 3 years ago

Last modified 23 months ago

String storing user's name should be trim()ed when first entered or changed in Control Panel

Reported by: greenfeld Owned by: garycmartin
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
Component: design Version: 0.90.x
Severity: Unspecified Keywords: sugar-love
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

When a user enters their user name during the first boot of Sugar or changes it in the "About Me" Control Panel, we should trim() the string containing the user's name on both sides, removing all whitespace that the user may have accidentally entered.

Right now this whitespace gets stored as part of the string. I do not know if it screws up anything beyond looking strange visually.

Reproduced in OLPC 0.84 as well as 0.90 SoaS builds.

Change History

Changed 3 years ago by greenfeld

Actually this is Python code so the correct string operator probably should be .strip()

Changed 2 years ago by walter

Be careful here: some students are using the name field to input a multi-line emoticon graphic as their name. I don't worry too much about white-space in single-line names, but it could matter in a multi-line name.

Changed 2 years ago by aj462

Our team emailed a fix to the developer's mailing list with the two files we manipulated attached. On initial creation of the name, we simply stripped the white space, but when editing, we checked for a new line character. If no new line character is found, we strip the extraneous white space from the name. Otherwise, we do nothing to allow proper formatting for fancy names.

Changed 23 months ago by sascha_silbe

  • owner set to garycmartin
  • component changed from untriaged to design
Note: See TracTickets for help on using tickets.