Tidy problems

Hello,

Great program!

I have encountered a few problems in Tidy. I haven't seen them reported before but I didn't check all archived messages either.
I use Tidy from an other program, running the parser several times on different HTML files without quiting Tidy, it causes some meory problems:

1) In parser.c, CoerceNode(...):
   The following line: MemFree(tmp->element);
   Should be inserted before the line: MemFree(tmp);
   Causes memory leaks for me as it is now sometimes.

2) In pprint.cpp FreePrintBuf(...);
   The following lines should be added:
    linebuf = NULL;
    lbufsize = 0;
   Causes memory problems when filtering many files at once if those   
   lines are not included.

Some other problems:

3) A line like (which of course is not correct HTML, but anyway):
  <b><font>bold</b><br>plain<br></font>
  Gives the result:
  <b><font>bold</font><br>plain<br></b>
  Instead of interpreting it as Netscape, something like:
  <font><b>bold</b><br>plain<br></font>

4) Unfinished tags, causes the next tag to be interpreted as text,    
   instead of as in netscape, correcting the tag. An example:
   <img src="link"<br>
   Gives the result:
   <img src="link">br&gt
   Instead of, as interpreted by Netscape:
   <img src=link"><br>

Some functionality that I would like to see in Tidy:

* An "Ugly print" option. Skipping all linebreaks and blanks,
  making the resulting file as compact as possible.

* A way to spcify replacement tags for unsupported tags. To transform   into a subset of HTML for example. Would be good if it could be done   during parsing, instead of after as I do now.


Regards!

/Daniel Persson  

Received on Monday, 8 May 2000 11:05:31 UTC