diff --git a/wp-admin/import/blogware.php b/wp-admin/import/blogware.php index 5497bfb6d4..319c4fbec1 100644 --- a/wp-admin/import/blogware.php +++ b/wp-admin/import/blogware.php @@ -29,12 +29,6 @@ class BW_Import { echo ''; } - function unhtmlentities($string) { // From php.net for < 4.3 compat - $trans_tbl = get_html_translation_table(HTML_ENTITIES); - $trans_tbl = array_flip($trans_tbl); - return strtr($string, $trans_tbl); - } - function greet() { echo '
'.__('Howdy! This importer allows you to extract posts from Blogware XML export file into your blog. Pick a Blogware file to upload and click Import.').'
'; @@ -78,18 +72,18 @@ class BW_Import { $cat_index = 0; foreach ($categories as $category) { - $categories[$cat_index] = $wpdb->escape($this->unhtmlentities($category)); + $categories[$cat_index] = $wpdb->escape( html_entity_decode($category) ); $cat_index++; } - if (strcasecmp($post_type, "photo") === 0) { + if ( strcasecmp($post_type, "photo") === 0 ) { preg_match('|'.__('Howdy! This importer allows you to extract posts from an RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'
'; @@ -87,7 +81,7 @@ class RSS_Import { $cat_index = 0; foreach ($categories as $category) { - $categories[$cat_index] = $wpdb->escape($this->unhtmlentities($category)); + $categories[$cat_index] = $wpdb->escape( html_entity_decode( $category ) ); $cat_index++; } @@ -103,7 +97,7 @@ class RSS_Import { if (!$post_content) { // This is for feeds that put content in description preg_match('|'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this blog.').'
'; @@ -450,7 +444,7 @@ class WP_Import { $tag_index = 0; foreach ($tags as $tag) { - $tags[$tag_index] = $wpdb->escape($this->unhtmlentities(str_replace(array (''), '', $tag))); + $tags[$tag_index] = $wpdb->escape( html_entity_decode( str_replace(array( '' ), '', $tag ) ) ); $tag_index++; } @@ -459,7 +453,7 @@ class WP_Import { $cat_index = 0; foreach ($categories as $category) { - $categories[$cat_index] = $wpdb->escape($this->unhtmlentities(str_replace(array (''), '', $category))); + $categories[$cat_index] = $wpdb->escape( html_entity_decode( str_replace( array( '' ), '', $category ) ) ); $cat_index++; }