Crash in TidyLib and Memory Leaks

Hi all

Took quite a while to narrow this down the following example:

Using the example test app, set the following options as below...
  ok = tidyOptSetBool( tdoc, TidyHtmlOut, yes );
  ok = tidyOptSetBool( tdoc, TidyEncloseBlockText, yes );

Then, try and validate/clean the following HTML...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Test</title>
</head>

<body>

<table><tbody>
<tr>
<td><br></td>
</tr>
</tbody></table>

</body>
</html>

You will get an exception in FixBrakes...
    /*  First, check the status of All My Children  */
    for ( pNode = pParent->content; NULL != pNode; pNode = pNode->next )

I am also getting a couple of memory leaks somewhere, not related to the
above problem.

Hope this helps someone to fix it.
Dan Petitt

Received on Saturday, 15 March 2003 09:31:49 UTC