diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php index 32371dda6..e80634a7d 100644 --- a/wp-admin/import/blogger.php +++ b/wp-admin/import/blogger.php @@ -437,7 +437,7 @@ class Blogger_Import { if ( count( $matches[1] ) ) foreach ( $matches[1] as $match ) if ( preg_match('/rel=.previous./', $match) ) - $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); + $query = @html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); if ( $query ) { parse_str($query, $q); @@ -495,7 +495,7 @@ class Blogger_Import { if ( count( $matches[1] ) ) foreach ( $matches[1] as $match ) if ( preg_match('/rel=.previous./', $match) ) - $query = html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); + $query = @html_entity_decode( preg_replace('/^.*href=[\'"].*\?(.+)[\'"].*$/', '$1', $match), ENT_COMPAT, get_option('blog_charset') ); parse_str($query, $q); @@ -545,7 +545,7 @@ class Blogger_Import { } $post_date = $this->convert_date( $entry->published ); - $post_content = trim( addslashes( $this->no_apos( html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ) ); + $post_content = trim( addslashes( $this->no_apos( @html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ) ); $post_title = trim( addslashes( $this->no_apos( $this->min_whitespace( $entry->title ) ) ) ); $post_status = isset( $entry->draft ) ? 'draft' : 'publish'; @@ -600,7 +600,7 @@ class Blogger_Import { $comment_author = addslashes( $this->no_apos( strip_tags( (string) $matches[1] ) ) ); $comment_author_url = addslashes( $this->no_apos( strip_tags( (string) $matches[2] ) ) ); $comment_date = $this->convert_date( $entry->updated ); - $comment_content = addslashes( $this->no_apos( html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ); + $comment_content = addslashes( $this->no_apos( @html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ); // Clean up content $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content); diff --git a/wp-admin/import/livejournal.php b/wp-admin/import/livejournal.php index 83602255d..4c6427731 100644 --- a/wp-admin/import/livejournal.php +++ b/wp-admin/import/livejournal.php @@ -576,7 +576,7 @@ class LJ_API_Import { // Get the body and HTMLize it preg_match( '|
(.*)|is', $comment, $matches ); $comment_content = !empty( $comment_subject ) ? $comment_subject . "\n\n" . $matches[1] : $matches[1]; - $comment_content = html_entity_decode( $comment_content ); + $comment_content = @html_entity_decode( $comment_content, ENT_COMPAT, get_option('blog_charset') ); $comment_content = str_replace( ''', "'", $comment_content ); $comment_content = wpautop( $comment_content ); $comment_content = str_replace( '