Fixed truncateWithEntities function which trimmed the string one char to