Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

html elements end up in a strange order. #13

@abgreeve

Description

@abgreeve

If I use the function as follows:
jQuery.truncate('<div class=\'frog\'><p><blockquote>Long text with tags that will be chopped off but <b>should be added back again</b></blockquote></p></div>', {length:15});

I would expect:
<div class="frog"><p><blockquote>Long text with...</blockquote></p></div>
But instead I get the following:
<div class="frog"><p></p><blockquote>Long text with...</blockquote></div>
Notice that the <p> tags no longer surrounds the <blockquote> element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions