Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 14 years ago

#1209 closed defect (bug) (fixed)

Search function does not like apostrophes?

Reported by: welshpixie's profile welshpixie Owned by: djpaul's profile DJPaul
Milestone: 1.5 Priority: minor
Severity: Version:
Component: Core Keywords: apostrophe, search, needs-patch
Cc:

Description

Using BP1.1 and WP 2.8.4a

We have a setup on our site that will call for users to search on terms that include apostrophes, but this doesn't seem to be working.

For example - a few of our users have a profile field filled in as The Sha'Tar. Searching for this field including the apostrophe yields no results. Searching for The Shar, however, finds everyone who has The Sha'Tar in their profile.

Our site is encouraging networking and will rely on people being able to search on this particular field, which will eventually have more names with apostrophes in them.

Apologies if this has already been brought up - I couldn't find a ticket with it.

Change History (6)

#1 @welshpixie
15 years ago

Sorry - that's searching on The Sha finds everyone, not The Shar :)

#2 @DJPaul
15 years ago

  • Keywords needs-patch added

#3 @apeatling
15 years ago

  • Milestone changed from 1.2 to 1.3

Punting this as it's not an easy fix and will need more time.

#4 @DJPaul
14 years ago

  • Component set to Core
  • Owner set to DJPaul
  • Status changed from new to assigned

#5 @boonebgorges
14 years ago

Paul, you probably already know this (thus #2776), but the problem here looks like double escaping - when I did addslashes( $search_terms ) in the get_users() method, I was able to get results.

#6 @DJPaul
14 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

This was fixed in [3511]), though searches may not work as intended until an underlying problem of double-escaping database content is addressed in #2776.

Note: See TracTickets for help on using tickets.