Skip to:

Opened 11 years ago

Closed 7 years ago

#5093 closed enhancement (worksforme)

Leading whitespace in display names messes with alphabetical sort

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: Priority: lowest
Severity: minor Version:
Component: Core Keywords: needs-testing needs-patch
Cc: vivek@…


If a username is entered as " Boone" rather than "Boone", it'll show up first in the list when doing an alphabetical sort. In my experience, a name is typically entered with leading whitespace by accident. But it could also be used as a sort of hack to get your profile to the top of the list. We might consider trimming this whitespace, either on the way in (at the time of profile save), or at the time of query:


Are there legit reasons for wanting leading whitespace? Would the latter query cause performance issues at scale? Needs testing.

Change History (4)

#1 @sooskriszta
10 years ago

  • Cc vivek@… added

While I can imagine special characters such as the exclamation/bang/! as the genuine leading letter in a name, I can't think of any reasons why a leading space would be needed.

We should trim it on profile save.

#2 @boonebgorges
10 years ago

  • Keywords needs-patch added; has-patch removed

#3 @slaFFik
7 years ago

  • Milestone changed from Future Release to 2.8

#4 @boonebgorges
7 years ago

  • Milestone 2.8 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

On further testing, it appears that field data is, in fact, stripped on save. I can't see at a glance when this change took place, but the stack trace is:

Note: See TracTickets for help on using tickets.