Make WordPress Core


Ignore:
Timestamp:
12/21/2006 10:10:04 AM (19 years ago)
Author:
markjaquith
Message:

new function for escaping within attributes: attribute_escape()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-admin/inline-uploading.php

    r4416 r4656  
    241241            $ypadding = (96 - $image['uheight']) / 2;
    242242            $style .= "#target{$ID} img { padding: {$ypadding}px {$xpadding}px; }\n";
    243             $title = wp_specialchars($image['post_title'], ENT_QUOTES);
     243            $title = attribute_escape($image['post_title']);
    244244            $script .= "aa[{$ID}] = '<a id=\"p{$ID}\" rel=\"attachment\" class=\"imagelink\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">';
    245245ab[{$ID}] = '<a class=\"imagelink\" href=\"{$image['guid']}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">';
     
    261261";
    262262        } else {
    263             $title = wp_specialchars($attachment['post_title'], ENT_QUOTES);
     263            $title = attribute_escape($attachment['post_title']);
    264264            $filename = basename($attachment['guid']);
    265265            $icon = get_attachment_icon($ID);
Note: See TracChangeset for help on using the changeset viewer.