chyrp/chyrp — Issue #60: metaWeblog_editPost slug issue
Author: pascal-n
Created: 2012-01-11 23:47:24+00:00
State: open

In `includes/xmlrpc.php`, around line 319, the `$post->update` call is missing a `url` parameter. Instead, the next given parameter `created_date` is used as slug, resulting in really ugly post URLs, e.g. "2012-01-12+00%3A04%3A50".

This will always occur when posting with [MarsEdit](http://www.red-sweater.com/marsedit/) (and possibly other XML-RPC desktop clients), since it first submits the new post as draft, and subsequently changes its status to published.

I've fixed this myself by inserting a `null` value, but I may have overlooked something:

$post->update(
array('title' => $args[3]['title'], 'body' => $body ),
null,
null,
$status,
null,
sanitize(oneof(@$args[3]['mt_basename'], $args[3]['title'])),
oneof($this->convertFromDateCreated($args[3]), $post->created_at));