Fixed truncate_html helper method