php class to truncate HTML content