Make WordPress Core


Ignore:
Timestamp:
05/05/2009 07:43:53 PM (15 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-admin/admin-ajax.php

    r11158 r11204  
    427427            'what' => 'link-category',
    428428            'id' => $cat_id,
    429             'data' => "<li id='link-category-$cat_id'><label for='in-link-category-$cat_id' class='selectit'><input value='" . attr($cat_id) . "' type='checkbox' checked='checked' name='link_category[]' id='in-link-category-$cat_id'/> $cat_name</label></li>",
     429            'data' => "<li id='link-category-$cat_id'><label for='in-link-category-$cat_id' class='selectit'><input value='" . esc_attr($cat_id) . "' type='checkbox' checked='checked' name='link_category[]' id='in-link-category-$cat_id'/> $cat_name</label></li>",
    430430            'position' => -1
    431431        ) );
     
    475475        $level++;
    476476    }
    477     $cat_full_name = attr($cat_full_name);
     477    $cat_full_name = esc_attr($cat_full_name);
    478478
    479479    $x = new WP_Ajax_Response( array(
     
    553553
    554554    $tag_full_name = $tag->name;
    555     $tag_full_name = attr($tag_full_name);
     555    $tag_full_name = esc_attr($tag_full_name);
    556556
    557557    $x = new WP_Ajax_Response( array(
     
    12151215        }
    12161216
    1217         $html .= '<tr class="found-posts"><td class="found-radio"><input type="radio" id="found-'.$post->ID.'" name="found_post_id" value="' . attr($post->ID) . '"></td>';
     1217        $html .= '<tr class="found-posts"><td class="found-radio"><input type="radio" id="found-'.$post->ID.'" name="found_post_id" value="' . esc_attr($post->ID) . '"></td>';
    12181218        $html .= '<td><label for="found-'.$post->ID.'">'.wp_specialchars($post->post_title, true).'</label></td><td>'.wp_specialchars($time, true).'</td><td>'.wp_specialchars($stat, true).'</td></tr>'."\n\n";
    12191219    }
Note: See TracChangeset for help on using the changeset viewer.