Permalink
Browse files

Update json lib. Use encodeUnsafe in our json wrapper. Props nacin. f…

…ixes #11537 for 2.9

git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
ryan
ryan committed Dec 22, 2009
1 parent d7cd7a9 commit 359ccb0bf88e763159196804afc194e9da96e654
Showing with 3 additions and 3 deletions.
  1. +2 −2 wp-includes/class-json.php
  2. +1 −1 wp-includes/compat.php
@@ -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 @@ function utf82utf16($utf8)
*/
function encode($var)
{
- header('Content-type: application/x-javascript');
+ header('Content-type: application/json');
return $this->_encode($var);
}
/**
View
@@ -133,7 +133,7 @@ function json_encode( $string ) {
$wp_json = new Services_JSON();
}
- return $wp_json->encode( $string );
+ return $wp_json->encodeUnsafe( $string );
}
}

0 comments on commit 359ccb0

Please sign in to comment.