Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#5655 closed defect (bug) (wontfix)

IXR_Error error messages should be in CDATA section

Reported by: filosofo Owned by: westi
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch IXR_Error xml-rpc xmlrpc xml cdata
Focuses: Cc:



  1. Semantically, they shouldn't be parsed.
  2. Practically, sometimes you want to output an error message that isn't properly formed XML, such as a var dump.

Attachments (1)

cdata_wrap.diff (467 bytes) - added by filosofo 10 years ago.

Download all attachments as: .zip

Change History (7)

10 years ago

#1 follow-up: @josephscott
10 years ago

  • Cc josephscott added

Have you tried this against various xmlrpc clients to see if any of them choke on this change?

#2 @josephscott
10 years ago

  • Component changed from General to XML-RPC

#3 in reply to: ↑ 1 @filosofo
10 years ago

Replying to josephscott:

Have you tried this against various xmlrpc clients to see if any of them choke on this change?

With two: Flock and a simple Perl script of mine that uses the RPC::XML package. Flock doesn't actually show the WP error messages to the user (as far as I can see), but it does write them to a log file just fine. Likewise, the Perl script using RPC::XML properly shows the error message (without parsing it).

Do you have a preferred client that you use for testing?

#4 @westi
10 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

If we are going to change IXR_Error should we not also change IXR_Value to wrap strings in CDATA tags?

At present they are just htmlspecialchars'd

#5 @josephscott
10 years ago

I had another response prepared for this, but then I went and looked at the xmlrpc spec again and it seems pretty clear that the faultstring value is a raw string. Unless there is something clearly to be gained by this change, which I don't see at this point, I don't see any reason to make this change.

I've sent out an email to the wp-xmlrpc list asking for additional feedback on this.

#6 @filosofo
10 years ago

  • Milestone 2.5 deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed
  • Version 2.5 deleted

You're right: that's what the spec says.

Note: See TracTickets for help on using tickets.