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

Description
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.