Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8.

Change all core calls from `json_encode()` to `wp_json_encode()`.

Fixes #28786.



git-svn-id: https://develop.svn.wordpress.org/trunk@30055 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2014-10-28 18:34:16 +00:00
parent 3d35d8bc5d
commit 0e68ecc0b6
17 changed files with 194 additions and 39 deletions
+1 -1
View File
@@ -1952,7 +1952,7 @@ final class WP_Internal_Pointers {
<script type="text/javascript">
//<![CDATA[
(function($){
var options = <?php echo json_encode( $args ); ?>, setup;
var options = <?php echo wp_json_encode( $args ); ?>, setup;
if ( ! options )
return;