search function fix for unescaping the search queries