wrap search results in div and exclude empty terms