X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/d3b1ea255664edd2deef17f900a655613d20820d..refs/tags/wordpress-2.9:/wp-admin/import/livejournal.php
diff --git a/wp-admin/import/livejournal.php b/wp-admin/import/livejournal.php
index bfebe718..7acfaa5f 100644
--- a/wp-admin/import/livejournal.php
+++ b/wp-admin/import/livejournal.php
@@ -324,6 +324,10 @@ class LJ_API_Import {
echo '';
}
+ function _normalize_tag( $matches ) {
+ return '<' . strtolower( $matches[1] );
+ }
+
function import_post( $post ) {
global $wpdb;
@@ -350,7 +354,7 @@ class LJ_API_Import {
// 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( '
', '
', $post_content );
$post_content = str_replace( '
and password so we can download your posts and comments.' ) ?>