Some time ago I created a very light-weight cms system for a client of mine, so he can easily edit the content of his website. While editing the content he can add html tags as well.
To prevent the client from adding incorrect or 'ugly' html I'm looking for a tool that can check the input and can correct the html and/ or can convert it to valid xhtml.
I found an extension for php that will do exactly what I want (http://pear.php.net/package-info.php?package=tidy). The only problem with this extension is that it is only supported bij php 5.0, which I and my client don't have.
Now I'm looking for a php-script that will have the same, or similar, functionality, but is also supported by php 4. I doesn't really matter if it isn't as extensive as the package above, as long as it can convert the html to valid (x)html.
Does anyone know of such a project? Or does anyone know whether it's very hard to create something like this yourself?
Thanks in advance!