From d417f96524f69d34c6133f373a23471871d87b86 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 19 Dec 2005 19:10:09 +0000 Subject: [PATCH] Validation tweaks. fixes #2097 git-svn-id: https://develop.svn.wordpress.org/trunk@3329 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-functions.php | 2 +- wp-admin/inline-uploading.php | 14 +++++++------- wp-includes/template-functions-post.php | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 64b66e25d9..7f0ed5e004 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -93,7 +93,7 @@ function fix_attachment_links($post_ID) { return; $i = 0; - $search = "# id=(\"|)(\d+)\\1#i"; + $search = "# id=(\"|')p(\d+)\\1#i"; foreach ( $anchor_matches[0] as $anchor ) { if ( 0 == preg_match($search, $anchor, $id_matches) ) continue; diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php index a033ebac59..c2706320c2 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -232,7 +232,7 @@ srcb[{$ID}] = '{$image['guid']}'; $xpadding = (128 - $image['uwidth']) / 2; $ypadding = (96 - $image['uheight']) / 2; $style .= "#target{$ID} img { padding: {$ypadding}px {$xpadding}px; }\n"; - $script .= "aa[{$ID}] = ''; + $script .= "aa[{$ID}] = ''; ab[{$ID}] = ''; imga[{$ID}] = '\"{$image['post_title']}\"'; imgb[{$ID}] = '\"{$image['post_title']}\"'; @@ -255,15 +255,15 @@ imgb[{$ID}] = '\"{$image['po$__using_title"; - $script .= "aa[{$ID}] = '{$attachment['post_title']}'; -ab[{$ID}] = '{$attachment['post_title']}'; + $script .= "aa[{$ID}] = '{$attachment['post_title']}'; +ab[{$ID}] = '{$attachment['post_title']}'; title[{$ID}] = '{$attachment['post_title']}'; filename[{$ID}] = '{$filename}'; icon[{$ID}] = '{$icon}'; "; $html .= "
{$noscript}
@@ -346,7 +346,7 @@ function toggleLink(n) { function toggleOtherLink(n) { od=document.getElementById('div'+n); ol=document.getElementById('L'+n); - oi=document.getElementById(n); + oi=document.getElementById('p'+n); ih=oi.innerHTML; if ( ol.innerHTML == linkedtofile ) { od.innerHTML = aa[n]; @@ -355,7 +355,7 @@ function toggleOtherLink(n) { od.innerHTML = ab[n]; ol.innerHTML = linkedtofile; } - oi=document.getElementById(n); + oi=document.getElementById('p'+n); oi.innerHTML = ih; } function toggleImage(n) { @@ -371,7 +371,7 @@ function toggleImage(n) { } function toggleOtherIcon(n) { od = document.getElementById('div'+n); - o = document.getElementById(n); + o = document.getElementById('p'+n); oi = document.getElementById('I'+n); if ( oi.innerHTML == usingtitle ) { o.innerHTML = filename[n]; diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php index c851947386..a13fa87a37 100644 --- a/wp-includes/template-functions-post.php +++ b/wp-includes/template-functions-post.php @@ -534,7 +534,7 @@ function get_attachment_icon($id = 0, $fullsize = false, $max_dims = false) { } } - $icon = "post_title}\" {$constraint}/>"; + $icon = "post_title}\" alt=\"{$post->post_title}\" {$constraint}/>"; return apply_filters('attachment_icon', $icon, $post->ID); }