MarsEdit 1.1 is out. It adds a number of nice new features and bug fixes. I use MarsEdit to edit all my weblog posts. It is a great tool.
Coincidentally, WordPress 2.0 was also recently released. WordPress is a nice enough weblog publishing engine. For me, the most important features were decent comments, useful permalinks, and a lot of canned templates so I didn’t have to torture myself any more than necessary with debugging random software. “It just works” was my mantra in choosing WordPress.
Of course, it doesn’t always “just work”. In particular, since upgrading to 2.0, posts made through MarsEdit that included class= attributes on div tags — what I use to float images left and right (amongst other things) — were being blown away.
After wading into some PHP code (GROSS! What a horrible piece of coding torture that was), the problem proved to be relatively easy to “fix”.
wp-includes/kses.php implements a filter that strips all posts of nefarious bits. Unfortunately, it doesn’t let the class= attribute through on div tags.
The fix is easy, even if it most be made in about a 2k character long single line of code.
class => array() to the
div tag specification:
'div' => array ('class' => array(), 'align' => array ())