Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Exclude certain characters of the search
This topic contains 2 replies, has 2 voices, and was last updated by Olivier Lecomte 7 years, 6 months ago.
- AuthorPosts
- September 3, 2015 at 2:01 pm #5797
Thank you for your great plugin !
I use the plugin in French (version 4.5.1 the latest version ),
and I have a problem with special characters for example :
– d‘abord
our
–l‘activité
The character ‘ is blocking the search.But the word “abord” or ” activité” only works well !
There is there a way to exclude certain characters of the research?
Thank you
September 3, 2015 at 2:41 pm #5800Hi!
I think you are using a different apostrophe character there.
If you try the l’activité or d’abord it’s going to work.
The ’ apostrophe is not same character as the ‘.I’ve logged in with the FTP account and created a filtering function to replace the incorrect apostrophe automatically for you. It took me a while, because the functions.php file was in an incorrect encoding, but I fixed that for you as well. The code I appended there for future reference:
// An extra function for fixing the apostrophes for Ajax Search PRO add_filter('asp_search_phrase_after_cleaning', 'asp_fix_apostrophe', 1, 1); function asp_fix_apostrophe( $s ) { $s = mb_ereg_replace("'", "’", $s); return stripslashes($s); }
This code remains after updates as well, you don’t have to worry 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 3, 2015 at 2:46 pm #5801Thank you so much for your great support !!! Big up !
- AuthorPosts
You must be logged in to reply to this topic.