Make WordPress Core


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

new function for escaping within attributes: attribute_escape()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r4612 r4656  
    335335                return __('Missing Attachment');
    336336
    337         $post_title = wp_specialchars( $_post->post_title, 1 );
     337        $post_title = attribute_escape( $_post->post_title);
    338338
    339339        if (! empty($_post->guid) ) {
    … …  
    421421        }
    422422
    423         $post_title = wp_specialchars( $post->post_title, 1 );
     423        $post_title = attribute_escape( $post->post_title);
    424424
    425425        $icon = "<img src='$src' title='$post_title' alt='$post_title' $constraint/>";
    … …  
    436436        $post = & get_post($id);
    437437
    438         $innerHTML = wp_specialchars( $post->post_title, 1 );
     438        $innerHTML = attribute_escape( $post->post_title);
    439439
    440440        return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
Note: See TracChangeset for help on using the changeset viewer.