Update json lib. Use encodeUnsafe in our json wrapper. Props nacin. fixes #11537 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@12491 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-12-22 16:49:35 +00:00
parent 9ff30116e7
commit 4a27f6549f
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
* @copyright 2005 Michal Migurski
* @version CVS: $Id: JSON.php,v 1.3 2009/05/22 23:51:00 alan_k Exp $
* @version CVS: $Id: JSON.php 288200 2009-09-09 15:41:29Z alan_k $
* @license http://www.opensource.org/licenses/bsd-license.php
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
*/
@ -235,7 +235,7 @@ class Services_JSON
*/
function encode($var)
{
header('Content-type: application/x-javascript');
header('Content-type: application/json');
return $this->_encode($var);
}
/**

View File

@ -133,7 +133,7 @@ if ( !function_exists('json_encode') ) {
$wp_json = new Services_JSON();
}
return $wp_json->encode( $string );
return $wp_json->encodeUnsafe( $string );
}
}