truncate-escaped-html (npm): Converts special characters in a string to the corresponding HTML entities, then truncates the resulting string carefully (HTML entities are not cut in the middle).
Keywords: HTML|escape|entities|entity|truncate|truncated|shorten|shortened