Index: blogware.php
===================================================================
--- blogware.php	(revision 12549)
+++ blogware.php	(working copy)
@@ -29,12 +29,6 @@
 		echo '</div>';
 	}
 
-	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 '<div class="narrow">';
 		echo '<p>'.__('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.').'</p>';
@@ -78,18 +72,18 @@
 
 			$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) {
 				preg_match('|<sizedPhotoUrl>(.*?)</sizedPhotoUrl>|is', $post, $post_content);
 				$post_content = '<img src="'.trim($post_content[1]).'" />';
-				$post_content = $this->unhtmlentities($post_content);
+				$post_content = html_entity_decode( $post_content );
 			} else {
 				preg_match('|<body>(.*?)</body>|is', $post, $post_content);
 				$post_content = str_replace(array ('<![CDATA[', ']]>'), '', trim($post_content[1]));
-				$post_content = $this->unhtmlentities($post_content);
+				$post_content = html_entity_decode( $post_content );
 			}
 
 			// Clean up content
@@ -130,7 +124,7 @@
 				foreach ($comments as $comment) {
 					preg_match('|<body>(.*?)</body>|is', $comment, $comment_content);
 					$comment_content = str_replace(array ('<![CDATA[', ']]>'), '', trim($comment_content[1]));
-					$comment_content = $this->unhtmlentities($comment_content);
+					$comment_content = html_entity_decode( $comment_content );
 
 					// Clean up content
 					$comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content);
Index: rss.php
===================================================================
--- rss.php	(revision 12549)
+++ rss.php	(working copy)
@@ -30,12 +30,6 @@
 		echo '</div>';
 	}
 
-	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 '<div class="narrow">';
 		echo '<p>'.__('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.').'</p>';
@@ -87,7 +81,7 @@
 
 			$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 @@
 			if (!$post_content) {
 				// This is for feeds that put content in description
 				preg_match('|<description>(.*?)</description>|is', $post, $post_content);
-				$post_content = $wpdb->escape($this->unhtmlentities(trim($post_content[1])));
+				$post_content = $wpdb->escape( html_entity_decode( trim( $post_content[1] ) ) );
 			}
 
 			// Clean up content
Index: wordpress.php
===================================================================
--- wordpress.php	(revision 12549)
+++ wordpress.php	(working copy)
@@ -43,12 +43,6 @@
 		echo '</div>';
 	}
 
-	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 '<div class="narrow">';
 		echo '<p>'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we&#8217;ll import the posts, pages, comments, custom fields, categories, and tags into this blog.').'</p>';
@@ -450,7 +444,7 @@
 
 		$tag_index = 0;
 		foreach ($tags as $tag) {
-			$tags[$tag_index] = $wpdb->escape($this->unhtmlentities(str_replace(array ('<![CDATA[', ']]>'), '', $tag)));
+			$tags[$tag_index] = $wpdb->escape( html_entity_decode( str_replace(array( '<![CDATA[', ']]>' ), '', $tag ) ) );
 			$tag_index++;
 		}
 
@@ -459,7 +453,7 @@
 
 		$cat_index = 0;
 		foreach ($categories as $category) {
-			$categories[$cat_index] = $wpdb->escape($this->unhtmlentities(str_replace(array ('<![CDATA[', ']]>'), '', $category)));
+			$categories[$cat_index] = $wpdb->escape( html_entity_decode( str_replace( array( '<![CDATA[', ']]>' ), '', $category ) ) );
 			$cat_index++;
 		}
 
