Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Specify the encoding in IXR_Server::output(). Props solarissmoke, ser…

…gey.s.betke@novgaro.ru, SergeyBiryukov. fixes #4794

git-svn-id: http://core.svn.wordpress.org/trunk@21531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit cb64a77217d839d69d80d03904e25fb5d2106c4b 1 parent b104249
Ryan Boren authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 wp-includes/class-IXR.php
View
11 wp-includes/class-IXR.php
@@ -466,11 +466,18 @@ function error($error, $message = false)
function output($xml)
{
- $xml = '<?xml version="1.0"?>'."\n".$xml;
+ $charset = function_exists('get_option') ? get_option('blog_charset') : '';
+ if ($charset)
+ $xml = '<?xml version="1.0" encoding="'.$charset.'"?>'."\n".$xml;
+ else
+ $xml = '<?xml version="1.0"?>'."\n".$xml;
$length = strlen($xml);
header('Connection: close');
header('Content-Length: '.$length);
- header('Content-Type: text/xml');
+ if ($charset)
+ header('Content-Type: text/xml; charset='.$charset);
+ else
+ header('Content-Type: text/xml');
header('Date: '.date('r'));
echo $xml;
exit;
Please sign in to comment.
Something went wrong with that request. Please try again.