Make WordPress Core


Ignore:
Timestamp:
05/05/2009 07:43:53 PM (17 years ago)
Author:
markjaquith
Message:

_a(), _ea(), _xa(), attr() are now esc_attr(), esc_attr_e(), esc_attr_x(), esc_attr() -- still short, but less cryptic. see #9650

File:
1 edited

Legend:

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

    r11109 r11204  
    620620function get_search_feed_link($search_query = '', $feed = '') {
    621621        if ( empty($search_query) )
    622                 $search = attr(get_search_query());
     622                $search = esc_attr(get_search_query());
    623623        else
    624                 $search = attr(stripslashes($search_query));
     624                $search = esc_attr(stripslashes($search_query));
    625625
    626626        if ( empty($feed) )
    … …  
    645645function get_search_comments_feed_link($search_query = '', $feed = '') {
    646646        if ( empty($search_query) )
    647                 $search = attr(get_search_query());
     647                $search = esc_attr(get_search_query());
    648648        else
    649                 $search = attr(stripslashes($search_query));
     649                $search = esc_attr(stripslashes($search_query));
    650650
    651651        if ( empty($feed) )
    … …  
    731731        }
    732732
    733         $link = '<a class="post-edit-link" href="' . get_edit_post_link( $post->ID ) . '" title="' . attr( __( 'Edit post' ) ) . '">' . $link . '</a>';
     733        $link = '<a class="post-edit-link" href="' . get_edit_post_link( $post->ID ) . '" title="' . esc_attr( __( 'Edit post' ) ) . '">' . $link . '</a>';
    734734        echo $before . apply_filters( 'edit_post_link', $link, $post->ID ) . $after;
    735735}
    … …  
    941941
    942942        $link = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
    943         $link .= attr( $title );
     943        $link .= esc_attr( $title );
    944944        $link .= "' href='" . get_permalink($post) . "' />\n";
    945945
    … …  
    10651065
    10661066        $link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
    1067         $link .= attr($title);
     1067        $link .= esc_attr($title);
    10681068        $link .= "' href='" . get_permalink($post) . "' />\n";
    10691069
    … …  
    10931093 */
    10941094function get_index_rel_link() {
    1095         $link = "<link rel='index' title='" . attr(get_bloginfo('name')) . "' href='" . get_bloginfo('siteurl') . "' />\n";
     1095        $link = "<link rel='index' title='" . esc_attr(get_bloginfo('name')) . "' href='" . get_bloginfo('siteurl') . "' />\n";
    10961096        return apply_filters( "index_rel_link", $link );
    10971097}
    … …  
    11281128
    11291129        $link = "<link rel='up' title='";
    1130         $link .= attr( $title );
     1130        $link .= esc_attr( $title );
    11311131        $link .= "' href='" . get_permalink($post) . "' />\n";
    11321132
Note: See TracChangeset for help on using the changeset viewer.