[buddypress-trac] [BuddyPress] #4704: Member search on string containing apostrophe returns no results.
buddypress-trac
noreply at wordpress.org
Wed Dec 5 07:22:55 UTC 2012
#4704: Member search on string containing apostrophe returns no results.
---------------------------------------+------------------------------
Reporter: kevingamin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Members | Version: 1.6.1
Severity: major | Resolution:
Keywords: needs-testing needs-patch |
---------------------------------------+------------------------------
Comment (by DJPaul):
Thanks for reporting this; I've seen it before, though I couldn't find an
existing ticket. I'm pretty sure this will affect searches other than
xprofile, but for xprofile:
1) Set xprofile name to "Paul's".
2) Look in xprofile data DB table; value is stored as "Paul\'s".
3) SQL query for the search terms logic in
BP_User_Query::prepare_user_ids_query() is:
"SELECT user_id FROM wp_bp_xprofile_data WHERE value LIKE
'%%paul\\\'s%%'"
Compare against how WP stores database data in post title and content;
"Paul's" is literally "Paul\'s", which is what #2776 is about.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4704#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list