[thelist] tidy config? (html 2 xhtml)

Sam-I-Am sam at sam-i-am.com
Tue Dec 2 12:20:56 CST 2003

I'm using Dave Raggett's Tidy (now on sourceforge: 
http://tidy.sourceforge.net/ ) to convert some html to xhtml.
My html is nominally xhtml - but it incorporates html fragments outside 
of my control (CMS-like output), so I'm running it through tidy to make 
sure. And it's wreaking havoc with the templates.

I'm finding it's trimming empty elements (e.g. <link />, <br />, <img /> 
tags) and my &nbsp; entities. That seems like the sort of thing I ought 
to be able to configure - those are by no means junk elements. But I 
must be missing it if the option exists.

I'm invoking tidy.exe like so:
tidy.exe -i -asxhtml

If I leave warnings on, (by ommitting the -q switch) it reports:
line 422 column 69 - Warning: trimming empty <img>

any ideas?

More information about the thelist mailing list