Make WordPress Core


Ignore:
Timestamp:
04/27/2009 09:58:04 PM (15 years ago)
Author:
ryan
Message:

attr(), _a(), _ea(), _xa() for shorthand attribute escaping. see #9650

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r11098 r11103  
    20742074 * Escaping for HTML attributes.
    20752075 *
    2076  * @since 2.0.6
     2076 * @since 2.8.0
    20772077 *
    20782078 * @param string $text
    20792079 * @return string
    20802080 */
    2081 function attribute_escape( $text ) {
     2081function attr( $text ) {
    20822082    $safe_text = wp_check_invalid_utf8( $text );
    20832083    $safe_text = wp_specialchars( $safe_text, ENT_QUOTES );
    20842084    return apply_filters( 'attribute_escape', $safe_text, $text );
     2085}
     2086
     2087/**
     2088 * Escaping for HTML attributes.
     2089 *
     2090 * @since 2.0.6
     2091 *
     2092 * @deprecated 2.8.0
     2093 * @see attr()
     2094 *
     2095 * @param string $text
     2096 * @return string
     2097 */
     2098function attribute_escape( $text ) {
     2099    return attr( $text );
    20852100}
    20862101
Note: See TracChangeset for help on using the changeset viewer.