updated for truncating and formatting html