Remove spaces at end of search field user input

Hi,

Searching for
“emily”
and
"emily "
should (IMHO) return all the users whose name starts by emily.

It’s also unclear why Mariam appears at the end of the list.