Search field does not work properly when using & symbol

[ad_1]

Hi,

I’m using this plugin for a while now and it suits all my needs. Our license just expired though, so I’m trying this way for this one particular issue.

Whenever a post title contains ‘&’ (AND symbol) and you search for this with the open search field, it will not find the post.

My guess this has something to do with sanitizing the input, as special characters get replaced with %20, %26 etc in the URL. I also build my own post loops (combined with ACF and ACF: Better Search).

I tried modifying the plugin’s search.php without success.

For example on the page I provided, if you search: Risk & Compliance, it will not find the post. If you type: Risk Compliance, it will find the post with the title ‘Risk & Compliance’. Vacancies – Working at the PNO Group

Any ideas on how I can make the ‘&’ work in the search field? I guess replacing it with a space would also do the job (I already tried preg_replace on the query though).

Thanks in advance

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer