Permalink
Browse files

Specify the charset in WP_Ajax_Response::send(). Props sergey.s.betke…

…@novgaro.ru, SergeyBiryukov. fixes #19448

git-svn-id: http://core.svn.wordpress.org/trunk@21528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 2394b77 commit c1b270d95a9b39812a4e917dbbab0622fc2c2bf5 Ryan Boren committed Aug 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 wp-includes/class-wp-ajax-response.php
@@ -126,8 +126,8 @@ function add( $args = '' ) {
* @since 2.1.0
*/
function send() {
- header('Content-Type: text/xml');
- echo "<?xml version='1.0' standalone='yes'?><wp_ajax>";
+ header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
+ echo "<?xml version='1.0' encoding='" . get_option( 'blog_charset' ) . "' standalone='yes'?><wp_ajax>";
foreach ( (array) $this->responses as $response )
echo $response;
echo '</wp_ajax>';

0 comments on commit c1b270d

Please sign in to comment.