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-includes/functions.php

    r11190 r11204  
    394394 */
    395395function form_option( $option ) {
    396     echo attr (get_option( $option ) );
     396    echo esc_attr(get_option( $option ) );
    397397}
    398398
     
    17441744 */
    17451745function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) {
    1746     $name = attr( $name );
     1746    $name = esc_attr( $name );
    17471747    $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />';
    17481748    if ( $echo )
     
    17691769 */
    17701770function wp_referer_field( $echo = true) {
    1771     $ref = attr( $_SERVER['REQUEST_URI'] );
     1771    $ref = esc_attr( $_SERVER['REQUEST_URI'] );
    17721772    $referer_field = '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />';
    17731773
     
    17951795    $jump_back_to = ( 'previous' == $jump_back_to ) ? wp_get_referer() : $_SERVER['REQUEST_URI'];
    17961796    $ref = ( wp_get_original_referer() ) ? wp_get_original_referer() : $jump_back_to;
    1797     $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . attr( stripslashes( $ref ) ) . '" />';
     1797    $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( stripslashes( $ref ) ) . '" />';
    17981798    if ( $echo )
    17991799        echo $orig_referer_field;
Note: See TracChangeset for help on using the changeset viewer.