refs #1228 - added a trim function to search term to prevent no-result w...

...hen spaces after search term