Make WordPress Core


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

    r11178 r11204  
    12711271    $smiley = trim(reset($smiley));
    12721272    $img = $wpsmiliestrans[$smiley];
    1273     $smiley_masked = attr($smiley);
     1273    $smiley_masked = esc_attr($smiley);
    12741274
    12751275    return " <img src='$siteurl/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
     
    20792079 * @return string
    20802080 */
    2081 function attr( $text ) {
     2081function esc_attr( $text ) {
    20822082    $safe_text = wp_check_invalid_utf8( $text );
    20832083    $safe_text = wp_specialchars( $safe_text, ENT_QUOTES );
     
    20912091 *
    20922092 * @deprecated 2.8.0
    2093  * @see attr()
     2093 * @see esc_attr()
    20942094 *
    20952095 * @param string $text
     
    20972097 */
    20982098function attribute_escape( $text ) {
    2099     return attr( $text );
     2099    return esc_attr( $text );
    21002100}
    21012101
Note: See TracChangeset for help on using the changeset viewer.