Make WordPress Core


Ignore:
Timestamp:
03/01/2013 04:28:40 PM (12 years ago)
Author:
ryan
Message:

Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767

File:
1 edited

Legend:

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

    r23543 r23554  
    469469
    470470                if ( in_array( substr( $type, 0, strpos( $type, "/" ) ), $allowed_types ) ) {
    471                     wp_add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime\n" );
     471                    add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime\n" );
    472472                }
    473473            }
     
    12581258 */
    12591259function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) {
    1260     $jump_back_to = ( 'previous' == $jump_back_to ) ? wp_get_referer() : wp_unslash( $_SERVER['REQUEST_URI'] );
     1260    $jump_back_to = ( 'previous' == $jump_back_to ) ? wp_get_referer() : $_SERVER['REQUEST_URI'];
    12611261    $ref = ( wp_get_original_referer() ) ? wp_get_original_referer() : $jump_back_to;
    1262     $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( $ref ) . '" />';
     1262    $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( stripslashes( $ref ) ) . '" />';
    12631263    if ( $echo )
    12641264        echo $orig_referer_field;
     
    12791279    $ref = false;
    12801280    if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
    1281         $ref = wp_unslash( $_REQUEST['_wp_http_referer'] );
     1281        $ref = $_REQUEST['_wp_http_referer'];
    12821282    else if ( ! empty( $_SERVER['HTTP_REFERER'] ) )
    1283         $ref = wp_unslash( $_SERVER['HTTP_REFERER'] );
    1284 
    1285     if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ) )
     1283        $ref = $_SERVER['HTTP_REFERER'];
     1284
     1285    if ( $ref && $ref !== $_SERVER['REQUEST_URI'] )
    12861286        return $ref;
    12871287    return false;
     
    12991299function wp_get_original_referer() {
    13001300    if ( !empty( $_REQUEST['_wp_original_http_referer'] ) )
    1301         return wp_unslash( $_REQUEST['_wp_original_http_referer'] );
     1301        return $_REQUEST['_wp_original_http_referer'];
    13021302    return false;
    13031303}
Note: See TracChangeset for help on using the changeset viewer.