Index: wp-admin/import/livejournal.php
===================================================================
--- wp-admin/import/livejournal.php	(revision 11963)
+++ wp-admin/import/livejournal.php	(working copy)
@@ -324,6 +324,10 @@
 		echo '</ol>';
 	}
 
+	function _normalize_tag( $matches ) {
+		return '<' . strtolower( $match[1] );
+	}
+
 	function import_post( $post ) {
 		global $wpdb;
 
@@ -350,7 +354,7 @@
 
 		// Clean up content
 		$post_content = $post['event'];
-		$post_content = preg_replace_callback( '|<(/?[A-Z]+)|', create_function( '$match', 'return "<" . strtolower( $match[1] );' ), $post_content );
+		$post_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content );
 		// XHTMLize some tags
 		$post_content = str_replace( '<br>', '<br />', $post_content );
 		$post_content = str_replace( '<hr>', '<hr />', $post_content );
@@ -581,7 +585,7 @@
 		$comment_content = wpautop( $comment_content );
 		$comment_content = str_replace( '<br>', '<br />', $comment_content );
 		$comment_content = str_replace( '<hr>', '<hr />', $comment_content );
-		$comment_content = preg_replace_callback( '|<(/?[A-Z]+)|', create_function( '$match', 'return "<" . strtolower( $match[1] );' ), $comment_content );
+		$comment_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content );
 		$comment_content = $wpdb->escape( trim( $comment_content ) );
 
 		// Get and convert the date
Index: wp-admin/import/blogger.php
===================================================================
--- wp-admin/import/blogger.php	(revision 11963)
+++ wp-admin/import/blogger.php	(working copy)
@@ -529,6 +529,10 @@
 		return preg_replace( '|\s+|', ' ', $string );
 	}
 
+	function _normalize_tag( $matches ) {
+		return '<' . strtolower( $match[1] );
+	}
+
 	function import_post( $entry ) {
 		global $importing_blog;
 
@@ -551,7 +555,7 @@
 		$post_status  = isset( $entry->draft ) ? 'draft' : 'publish';
 
 		// Clean up content
-		$post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+		$post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content);
 		$post_content = str_replace('<br>', '<br />', $post_content);
 		$post_content = str_replace('<hr>', '<hr />', $post_content);
 
@@ -604,7 +608,7 @@
 		$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);
+		$comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content);
 		$comment_content = str_replace('<br>', '<br />', $comment_content);
 		$comment_content = str_replace('<hr>', '<hr />', $comment_content);
 
@@ -905,12 +909,21 @@
 	var $entry;
 
 	function AtomParser() {
-
 		$this->entry = new AtomEntry();
-		$this->map_attrs_func = create_function('$k,$v', 'return "$k=\"$v\"";');
-		$this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";');
 	}
 
+	function _map_attrs_func( $k, $v ) {
+		return "$k=\"$v\"";
+	}
+
+	function _map_xmlns_func( $p, $n ) {
+		$xd = "xmlns";
+		if ( strlen( $n[0] ) > 0 )
+			$xd .= ":{$n[0]}";
+
+		return "{$xd}=\"{$n[1]}\"";
+	}
+
 	function parse($xml) {
 
 		global $app_logging;
@@ -950,12 +963,12 @@
 			foreach($attrs as $key => $value) {
 				$attrs_prefix[$this->ns_to_prefix($key)] = $this->xml_escape($value);
 			}
-			$attrs_str = join(' ', array_map($this->map_attrs_func, array_keys($attrs_prefix), array_values($attrs_prefix)));
+			$attrs_str = join(' ', array_map( array( &$this, '_map_attrs_func' ), array_keys($attrs_prefix), array_values($attrs_prefix)));
 			if(strlen($attrs_str) > 0) {
 				$attrs_str = " " . $attrs_str;
 			}
 
-			$xmlns_str = join(' ', array_map($this->map_xmlns_func, array_keys($this->ns_contexts[0]), array_values($this->ns_contexts[0])));
+			$xmlns_str = join(' ', array_map( array( &$this, '_map_xmlns_func' ), array_keys($this->ns_contexts[0]), array_values($this->ns_contexts[0])));
 			if(strlen($xmlns_str) > 0) {
 				$xmlns_str = " " . $xmlns_str;
 			}
Index: wp-admin/import/blogware.php
===================================================================
--- wp-admin/import/blogware.php	(revision 11963)
+++ wp-admin/import/blogware.php	(working copy)
@@ -42,6 +42,10 @@
 		echo '</div>';
 	}
 
+	function _normalize_tag( $matches ) {
+		return '<' . strtolower( $match[1] );
+	}
+
 	function import_posts() {
 		global $wpdb, $current_user;
 
@@ -89,7 +93,7 @@
 			}
 
 			// Clean up content
-			$post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+			$post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content);
 			$post_content = str_replace('<br>', '<br />', $post_content);
 			$post_content = str_replace('<hr>', '<hr />', $post_content);
 			$post_content = $wpdb->escape($post_content);
@@ -129,7 +133,7 @@
 					$comment_content = $this->unhtmlentities($comment_content);
 
 					// Clean up content
-					$comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content);
+					$comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content);
 					$comment_content = str_replace('<br>', '<br />', $comment_content);
 					$comment_content = str_replace('<hr>', '<hr />', $comment_content);
 					$comment_content = $wpdb->escape($comment_content);
Index: wp-admin/import/rss.php
===================================================================
--- wp-admin/import/rss.php	(revision 11963)
+++ wp-admin/import/rss.php	(working copy)
@@ -43,6 +43,10 @@
 		echo '</div>';
 	}
 
+	function _normalize_tag( $matches ) {
+		return '<' . strtolower( $match[1] );
+	}
+
 	function get_posts() {
 		global $wpdb;
 
@@ -103,7 +107,7 @@
 			}
 
 			// Clean up content
-			$post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+			$post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content);
 			$post_content = str_replace('<br>', '<br />', $post_content);
 			$post_content = str_replace('<hr>', '<hr />', $post_content);
 
Index: wp-admin/import/wordpress.php
===================================================================
--- wp-admin/import/wordpress.php	(revision 11963)
+++ wp-admin/import/wordpress.php	(working copy)
@@ -357,6 +357,10 @@
 		echo '<h3>'.sprintf(__('All done.').' <a href="%s">'.__('Have fun!').'</a>', get_option('home')).'</h3>';
 	}
 
+	function _normalize_tag( $matches ) {
+		return '<' . strtolower( $match[1] );
+	}
+
 	function process_post($post) {
 		global $wpdb;
 
@@ -383,12 +387,12 @@
 		$post_author    = $this->get_tag( $post, 'dc:creator' );
 
 		$post_excerpt = $this->get_tag( $post, 'excerpt:encoded' );
-		$post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_excerpt);
+		$post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_excerpt);
 		$post_excerpt = str_replace('<br>', '<br />', $post_excerpt);
 		$post_excerpt = str_replace('<hr>', '<hr />', $post_excerpt);
 
 		$post_content = $this->get_tag( $post, 'content:encoded' );
-		$post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+		$post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content);
 		$post_content = str_replace('<br>', '<br />', $post_content);
 		$post_content = str_replace('<hr>', '<hr />', $post_content);
 
