[wp-testers] Attachment bug?

Dougal Campbell dougal at gunters.org
Thu Feb 16 21:51:37 GMT 2006


Andy Skelton wrote:
> On 2/16/06, Dougal Campbell <dougal at gunters.org> wrote:
>> I've assumed ownership of the bug, and posted my patch. If it looks good
>> to the other devs, I'll commit the patch to trunk and to the 2.0 branch.
>>
>> [1] http://trac.wordpress.org/ticket/2434
> 
> I'd be more inclined to mimic what wp_update_post() does by running
> $attachment and $post through add_magic_quotes() before
> wp_update_post().

Actually, I tried running $post through add_magic_quotes(), but it gave 
me an error. Go figure.

I don't remember what the error was, exactly. I suppose I could try it 
again, if you're curious. But that's why I wound up using 
addslashes_gpc(). I'm still not sure if it might be better to call 
$wpdb->escape() directly, though. If the post contains backslashes that 
really are supposed to be part of the content, addslashes_gpc() might be 
stripping them out?


-- 
Dougal Campbell <dougal at gunters.org>
http://dougal.gunters.org/



More information about the wp-testers mailing list