[wp-xmlrpc] Patch to trim whitespace from description/more

Joseph Scott joseph at randomnetworks.com
Wed Feb 27 16:52:19 GMT 2008


On Feb 27, 2008, at 1:32 AM, Daniel Jalkut wrote:

> There are a variety of little problems with the way XMLRPC in WP  
> currently literally interprets the description and mt_text_more  
> components of a post cargo.
>
> The rest of WP is strongly biased towards trimming these components  
> such that there is no whitespace between them and the separator  
> "\n<!--more-->\n".
>
> Because XMLRPC currently crudely combines the two components with  
> the separator, you can end up with unwanted whitespace in the  
> database, which further confuses things in the rest of WP.
>
> I propose to trim these components so that submitting a post from a  
> remote client will result in the same massaging of the content that  
> entering the post from wp-admin experiences.
>
> http://trac.wordpress.org/ticket/6016


My only concern would be that this would limit some of the uses of  
<!--more-->, for example:

	The answer to the question is ... <!--more--> 42!

With your patch that would translate into :

	The answer to the question is ...
	<!--more-->
	42!

Which would not be rendered the same way.  I'm not sure that is  
really a big deal, but it would be different from what can be done  
using wp-admin.

I'll post this follow up to the ticket as well. Grrrrr, sometimes I  
hate wiki formatting.

--
Joseph Scott
joseph at randomnetworks.com
http://joseph.randomnetworks.com/





More information about the wp-xmlrpc mailing list