If the the content is being fetched using AJAX and the return type is text that you are using to plop in as the inner-html for the div, than you should be able to parse through the text and push elements onto a stack when opening tags are encountered. Pop when closing tags are encountered. Any tags on the stack at the end of the input need closed.
-Shawn On 7/19/07, Jonathan Sharp <[EMAIL PROTECTED]> wrote:
I think you're going to have to attack that server side as the html is interperted browserside into the dom tree which automatically closes tags as necessairy. -js On 7/19/07, sozzi <[EMAIL PROTECTED]> wrote: > > > I have a rather odd problem where I am looking for potentially missing > html tags due to truncation and need to close them. > > I am displaying a short summaries for an overview of published > articles by showing a title and the first 30 words. Unfortunately > sometimes the article starts with an OL or UL and the closing tags get > truncated. > > Is there a way to find missing closing tags within a div and close > them automatically? I don't need a final solution, any hint where to > start would be great, preferably client-side (jQuery) until I get it > sorted on the server-side.... > > Thanks > >