[wp-trac] [WordPress Trac] #22936: XML-RPC WordPress api setOption double escapes args

WordPress Trac noreply at wordpress.org
Wed Mar 5 00:12:14 UTC 2014


#22936: XML-RPC WordPress api setOption double escapes args
------------------------------------+------------------
 Reporter:  jachzen                 |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.9
Component:  XML-RPC                 |     Version:
 Severity:  major                   |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------

Comment (by maxcutler):

 The code part of 22936.1.diff looks correct to me. The reason that the
 unit test is failing is that the particular option it uses
 (`blog_title`/`blogname`) gets HTML-escaped in `sanitize_option`, so the
 single-quote gets converted to its HTML entity encoding.

 The test needs to be updated to expect the HTML encoding. Might be worth
 adding a test case for some other option that doesn't get run through
 `esc_html`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22936#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list