refactor rendering of excerpted post contents in search result