How to trim white space in search terms?

I’m seeing a weird problem where if someone searches “Test Search” it’s returning fine, but if someone searches “Test Search ” it’s returning some weird posts that don’t seem relevant.

How do I go about trimming white space from beginning and end of a search term?

Read more here:: How to trim white space in search terms?

Leave a Reply

Your email address will not be published. Required fields are marked *