WordPress.org

Make WordPress Core

Ticket #7813: export.diff

File export.diff, 782 bytes (added by tott, 11 years ago)

possible patch for encoding problem. needs testing

  • wp-admin/includes/export.php

     
    9696 * @param string $str String to place in XML CDATA tag.
    9797 */
    9898function wxr_cdata($str) {
    99        if ( seems_utf8($str) == false )
    100                $str = utf8_encode($str);
    101 
     99        // commented as we do not always want utf-8
     100       //if ( seems_utf8($str) == false )
     101       //      $str = utf8_encode($str);
    102102       // $str = ent2ncr(wp_specialchars($str));
    103103
     104       mb_convert_encoding($str, strtoupper(get_option('blog_charset')));
     105
    104106       $str = "<![CDATA[$str" . ( ( substr($str, -1) == ']' ) ? ' ' : '') . "]]>";
    105107
    106108       return $str;