From d1d4eab47c9b4aa6dda1e738584709dfddec126c Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 27 Oct 2006 03:58:53 +0000 Subject: [PATCH] Temporary image parsing fix from mdawaffe until a more robust attachment API is ready. fixes #3287 git-svn-id: https://develop.svn.wordpress.org/trunk@4427 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/upload-functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/upload-functions.php b/wp-admin/upload-functions.php index 623daeb5d6..82392ba3ca 100644 --- a/wp-admin/upload-functions.php +++ b/wp-admin/upload-functions.php @@ -13,9 +13,9 @@ function wp_upload_display( $dims = false, $href = '' ) { $class = 'text'; $innerHTML = get_attachment_innerHTML( $id, false, $dims ); - if ( $image_src = strstr($innerHTML, 'src="') ) { - $image_src = explode('"', $image_src); - $image_src = $image_src[1]; + if ( $image_src = strstr($innerHTML, 'src=') ) { + preg_match("/src=(\"|')(.+?)\\1/", $image_src, $matches); + $image_src = $matches[2]; $image_rel = wp_make_link_relative($image_src); $class = 'image'; $innerHTML = ' ' . str_replace($image_src, $image_rel, $innerHTML);