diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index d416183f2..0b2ed2cca 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -122,12 +122,12 @@ function fix_attachment_links($post_ID) { return; $i = 0; - $search = "# id=(\"|')p(\d+)\\1#i"; + $search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i"; foreach ( $anchor_matches[0] as $anchor ) { if ( 0 == preg_match($search, $anchor, $id_matches) ) continue; - $id = $id_matches[2]; + $id = $id_matches[3]; // While we have the attachment ID, let's adopt any orphans. $attachment = & get_post($id, ARRAY_A); @@ -2007,11 +2007,11 @@ function the_attachment_links($id = false) { - + - + @@ -2020,7 +2020,7 @@ function the_attachment_links($id = false) { - + @@ -2120,4 +2120,4 @@ function wp_load_image($file) { return $image; } -?> \ No newline at end of file +?> diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php index 5c760b70e..bab889e81 100644 --- a/wp-admin/upload-js.php +++ b/wp-admin/upload-js.php @@ -221,7 +221,7 @@ addLoadEvent( function() { display = 'full'; if ( 'none' != link ) - h += ""; + h += ""; if ( display ) h += "" + this.currentImage.title + ""; else