WordPress.org

Make WordPress Core

Ticket #4794: 4794.2.diff

File 4794.2.diff, 723 bytes (added by SergeyBiryukov, 21 months ago)
  • wp-includes/class-IXR.php

     
    466466 
    467467    function output($xml) 
    468468    { 
    469         $xml = '<?xml version="1.0"?>'."\n".$xml; 
     469        $charset = get_option('blog_charset'); 
     470        $xml = '<?xml version="1.0" encoding="'.$charset.'"?>'."\n".$xml; 
    470471        $length = strlen($xml); 
    471472        header('Connection: close'); 
    472473        header('Content-Length: '.$length); 
    473         header('Content-Type: text/xml'); 
     474        header('Content-Type: text/xml; charset='.$charset); 
    474475        header('Date: '.date('r')); 
    475476        echo $xml; 
    476477        exit;