]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/import/rss.php
Wordpress 2.9
[autoinstalls/wordpress.git] / wp-admin / import / rss.php
index 9a85df36b4c74a3af698c6841f8cacdaef2a94f0..0e0928cc49fc1e8326d4df39f1e4ec72e9c28eab 100644 (file)
@@ -43,6 +43,10 @@ class RSS_Import {
                echo '</div>';
        }
 
+       function _normalize_tag( $matches ) {
+               return '<' . strtolower( $matches[1] );
+       }
+
        function get_posts() {
                global $wpdb;
 
@@ -103,7 +107,7 @@ class RSS_Import {
                        }
 
                        // 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);