WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/18/2009 04:00:33 PM (12 years ago)
Author:
markjaquith
Message:

Deprecate sanitize_url() and clean_url() in favor of esc_url_raw() and esc_url()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r11380 r11383  
    142142function wp_loginout($redirect = '') {
    143143    if ( ! is_user_logged_in() )
    144         $link = '<a href="' . clean_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
     144        $link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
    145145    else
    146         $link = '<a href="' . clean_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
     146        $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
    147147
    148148    echo apply_filters('loginout', $link);
     
    690690    $text = wptexturize($text);
    691691    $title_text = esc_attr($text);
    692     $url = clean_url($url);
     692    $url = esc_url($url);
    693693
    694694    if ('link' == $format)
     
    18081808            $link = add_query_arg( $add_args, $link );
    18091809        $link .= $add_fragment;
    1810         $page_links[] = "<a class='prev page-numbers' href='" . clean_url($link) . "'>$prev_text</a>";
     1810        $page_links[] = "<a class='prev page-numbers' href='" . esc_url($link) . "'>$prev_text</a>";
    18111811    endif;
    18121812    for ( $n = 1; $n <= $total; $n++ ) :
     
    18221822                    $link = add_query_arg( $add_args, $link );
    18231823                $link .= $add_fragment;
    1824                 $page_links[] = "<a class='page-numbers' href='" . clean_url($link) . "'>$n_display</a>";
     1824                $page_links[] = "<a class='page-numbers' href='" . esc_url($link) . "'>$n_display</a>";
    18251825                $dots = true;
    18261826            elseif ( $dots && !$show_all ) :
     
    18361836            $link = add_query_arg( $add_args, $link );
    18371837        $link .= $add_fragment;
    1838         $page_links[] = "<a class='next page-numbers' href='" . clean_url($link) . "'>$next_text</a>";
     1838        $page_links[] = "<a class='next page-numbers' href='" . esc_url($link) . "'>$next_text</a>";
    18391839    endif;
    18401840    switch ( $type ) :
     
    19361936    }
    19371937
    1938     echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . clean_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
     1938    echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
    19391939    if ( 'rtl' == get_bloginfo( 'text_direction' ) )
    1940         echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . clean_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
     1940        echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
    19411941}
    19421942
Note: See TracChangeset for help on using the changeset viewer.