[wp-trac] [WordPress Trac] #21318: User search does not trim whitespace leading to good results not being returned
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 19 22:25:50 UTC 2012
#21318: User search does not trim whitespace leading to good results not being
returned
-------------------------+-----------------------------
Reporter: tollmanz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Keywords:
-------------------------+-----------------------------
When searching for a user in a single site (in a network or single site
install), addition of a leading or trailing whitespace can lead to no
results being returned. While technically, the string with the whitespace
isn't matched, the search string should be trimmed prior to the being used
in the search.
To reproduce:
1) Go to wp-admin/users.php
2) Assuming you have a user with name "admin", search for "admin " (note
the trailing whitespace)
3) No results will be returned (assuming no user with the "admin " exists)
4) Search for "admin"
5) The "admin" user account will be returned.
The search term should be trimmed before sending to WP_User_Query
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21318>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list