[wp-xmlrpc] An Error in Custom Fields Processing?

Joseph Scott joseph at josephscott.org
Fri Apr 17 22:35:15 GMT 2009


On Apr 17, 2009, at 9:54 AM, David Weiss wrote:

> Thanks to everyone's help here, I am "THIS" close (holding my index  
> finger and thumb a 1/4 inch apart) to having a really slick solution  
> for getting my project working.
>
> One more problem.
>
> Let's say I have a URL I'm sticking into a custom field and using  
> getPost or editPost to create/update that custom field.
>
> The XML that gets passed looks just fine:
>
> <value><struct>
> <member><name>id</name><value><string>3038</string></value></member>
> <member><name>key</name><value><string>_photo_1_large</string></ 
> value></member><member><name>value</name><value><string>/wordpress/ 
> images/image.php/07160864_1.jpg?width=600&amp;height=400&amp;image=/ 
> wordpress/images/07160864_1.jpg</string></value></member>
> </struct></value>
>
> But once it's inside of WP, the "&" gets stripped off the "&amp;".
>
> How do I fix this?  I've tried adding an extra "&" and all sorts of  
> other permutations of possibilities.



I've been trying to reproduce this with no luck so far.  What version  
are you using?  I've been testing against -trunk so it's possible that  
something has changed that addressed this.

I used the IXR library and my custom field looked like:

         array(
             "key"   => "photo",
             "value" => "/wordpress/images/image.php/07160864_1.jpg? 
width=600&amp;height=400&amp;image=/wordpress/images/07160864_1.jpg"
         )

I checked the DB, the edit post screen and the results of  
metaWeblog.getPost, they all returned the same string with the &amp;  
intact.

--
Joseph Scott
joseph at josephscott.org
http://josephscott.org/






More information about the wp-xmlrpc mailing list