Since I’ve been working on another blog (http://info1.blackhc.net) for my tutorial at university, I’ve played around with using Microsoft Word for publishing and editing content on the blog. I gotta say that SmartArts are really nice and good way to lighten up blog posts easily.

However Word’s support for the current version of WordPress is sub-optimal - that is, it totally messes up formatting when retrieving existing blog posts (that is, Word doesn’t recognize any paragraphs or line breaks). I’ve spent some time digging around in the blog’s .php code to find a way to fix it and after an hour or so, I’ve been able to fix it. It’s one-liner I want to share with you:

//'description' => $post['main'], // line 1939 in xmlrpc.php (function mw_getPost)
'description' => wpautop( $post['main'] ),

The function wpautop adds <p> tags to your text (and by default <br> tags, too).

This will fix the formatting bug in Word. This is a hack, of course, but it works for Word.

WordPress has a bug in its Atom Publishing Protocol code, too: It messes up the status code header when asking for user credentials, which prevents your browser from displaying the login form. Again only one line needs to be changed:

// header('Status: ' . $msg); // line 1014 in wp-app.php (function: auth_required)
header('Status: 401 ' . $msg);

Stay tuned for more updates in the next months.. :-) Cheers,
 Andreas

PS: University is really keeping me busy..