[wp-trac] [WordPress Trac] #28786: wp_send_json silently fails on non UTF-8 strings

WordPress Trac noreply at wordpress.org
Sun Oct 26 21:11:25 UTC 2014


#28786: wp_send_json silently fails on non UTF-8 strings
------------------------------+------------------
 Reporter:  pento             |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  4.1
Component:  Formatting        |     Version:  3.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+------------------

Comment (by pento):

 [attachment:28786.12.diff] uses a `static` var instead of
 `function_exists()`, and does strict `mb_detect_encoding()` checks.

 I'm inclined to keep `_wp_json_convert_string()` as a function
 specifically for JSON. I'm working on a patch for WPDB that will provide
 more comprehensive character set conversion functionality.

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


More information about the wp-trac mailing list