Skip to content
This repository was archived by the owner on Sep 7, 2024. It is now read-only.
This repository was archived by the owner on Sep 7, 2024. It is now read-only.

Problem handling entities #28

@numscrl

Description

@numscrl

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions