refactor render_post_content_for_search (tell, don't ask)