PHP library to handle truncate action on HTML strings