Opened 10 years ago

Last modified 6 years ago

#2485 new defect

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
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 (6)

comment:1 Changed 10 years ago by greenfeld

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

comment:2 Changed 10 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.

comment:3 Changed 10 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.

comment:4 Changed 10 years ago by sascha_silbe

  • Component changed from untriaged to design
  • Owner set to garycmartin

comment:5 Changed 6 years ago by yashmehrotra

Hi, is this bug still active ? I would like to solve it .

comment:6 Changed 6 years ago by godiard

First task is check if is active, if not, should be closed

Note: See TracTickets for help on using tickets.