HTML as a Wiki Language

I recently made a JSP taglib which uses HTMLTidy to clean up the content of my blog code, transforming it dynamically into XHTML-Transitional. It's definitely not the most efficient system in the world (better to modify the data in the database, no?) but it works. I just installed it onto Mobitopia because Jim was going on about it and lo-and-behold it validates.

The funny thing is that what it essentially does is make HTML into a wiki-like language! You know how Wikis work with that weird markup which is magically transformed into real HTML on the fly? Well now on Mobi, you can type in all sorts of junk markup, and HTML Tidy will go through and clean it all up for you into real XHTML. Very amusing if you think about it, markup as non-markup

It's a shame that this code seems like such an afterthought (it doesn't clean duplicated attribute names, for example). I mean, imagine a tag library that REALLY went through and cleaned up your HTML into valid XHTML-Strict. It would be awesome. But I mean, it would have to be REALLY intelligent for many pages out there. My markup (and the stuff on Mobi) has always been pretty damn clean so that's why this works for me now, but I'm sure that a lot of pages out there would be near impossible. Still it's a thought.

-Russ

< Previous         Next >