A tool for truncating HTML strings efficiently