nodejs-html-truncate icon indicating copy to clipboard operation
nodejs-html-truncate copied to clipboard

Problem handling entities

Open numscrl opened this issue 7 years ago • 0 comments

I'm seeing problems with properly entities, particularly with shorter strings. For example:

var truncate = require("html-truncate"); truncate( "<p>David &amp; Jenny</p>", 13, { ellipsis: "" } );

returns "David & J"

truncate( "<p>D&amp;C</p>", 4, { ellipsis: "" } );

returns "D&am"

numscrl avatar Oct 12 '18 15:10 numscrl