added proper html truncation