WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 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:

Description

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 6 years ago.

Download all attachments as: .zip

Change History (4)

josephscott6 years ago

comment:1 ryan6 years ago

get_cat_ID() should probably do the stripping.

comment:2 ryan6 years ago

  • Owner changed from anonymous to ryan

comment:3 ryan6 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.