This is a rather hackish script I use to make my WoW forum posting much more painless. I can use a WYSIWYG XHTML editor (Dreamweaver in my case) to create my posts which makes editing them a whole lot easier. Feed it an XHTML file and it spits out a text file with optimized BML (Blizzard Markup Language). The text file is split into <= 5000-byte sections for each post. All unnecessary whitespace is removed so it can squeeze more content into a single post. It recognizes some of the most common XHTML tags that have direct correlations to blizzard formatting. If you're comfortable editing Lua files you can add any new ones you want to use and change the way existing ones are rendered.
Beware though... It is quite short on error checking so expect the unexpected if your XHTML isn't valid between the <body> tags.
Further documentation is in the Lua file itself.
The Zip file contains the XHTML and compiled versions of my Macro Guide sticky so you can see how all the elements play together in the final product.