Make WordPress Core


Ignore:
Timestamp:
03/03/2009 06:37:25 PM (16 years ago)
Author:
ryan
Message:

Pass blog charset to html_entity_decode(). Props adferguson. fixes #7563

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/blogger.php

    r10339 r10688  
    438438                    foreach ( $matches[1] as $match )
    439439                        if ( preg_match('/rel=.previous./', $match) )
    440                             $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match) );
     440                            $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') );
    441441
    442442                if ( $query ) {
     
    496496                    foreach ( $matches[1] as $match )
    497497                        if ( preg_match('/rel=.previous./', $match) )
    498                             $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match) );
     498                            $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') );
    499499
    500500                parse_str($query, $q);
     
    546546
    547547        $post_date    = $this->convert_date( $entry->published );
    548         $post_content = trim( addslashes( $this->no_apos( html_entity_decode( $entry->content ) ) ) );
     548        $post_content = trim( addslashes( $this->no_apos( html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ) );
    549549        $post_title   = trim( addslashes( $this->no_apos( $this->min_whitespace( $entry->title ) ) ) );
    550550        $post_status  = isset( $entry->draft ) ? 'draft' : 'publish';
     
    601601        $comment_author_url = addslashes( $this->no_apos( strip_tags( (string) $matches[2] ) ) );
    602602        $comment_date    = $this->convert_date( $entry->updated );
    603         $comment_content = addslashes( $this->no_apos( html_entity_decode( $entry->content ) ) );
     603        $comment_content = addslashes( $this->no_apos( html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) );
    604604
    605605        // Clean up content
Note: See TracChangeset for help on using the changeset viewer.