Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#7849 closed defect (bug) (fixed)

Fix settings category with apostrophe in metaWeblog.newPost (XML-RPC)

Reported by: josephscott Owned by: ryan
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch
Focuses: Cc:


The problem was originally reported in the iPhone app ticket http://iphone.trac.wordpress.org/ticket/44

When setting a category with an apostrophe in it as part of a metaWeblog.newPost XML-RPC call that category gets skipped. The reason for this is that the apostrophe gets escaped twice, first at the XML-RPC level and second via prepare when generating the SQL query.

To fix this I've created a patch that calls stripslashes() on the category name before passing it to get_cat_ID().

Attachments (1)

xmlrpc.php.diff (465 bytes) - added by josephscott 10 years ago.

Download all attachments as: .zip

Change History (4)

#1 @ryan
10 years ago

get_cat_ID() should probably do the stripping.

#2 @ryan
10 years ago

  • Owner changed from anonymous to ryan

#3 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9229]) Don't double escape in get_cat_ID(). fixes #7849

Note: See TracTickets for help on using tickets.