Refactor and adds test for html_safe result from String#truncate