Fixed broken detection of void elements in truncateHTML()