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

    r11380 r11383  
    7878                $class = " class='current'";
    7979            $href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false, 'post_mime_type'=>false, 'm'=>false));
    80             $link = "<a href='" . clean_url($href) . "'$class>$text</a>";
     80            $link = "<a href='" . esc_url($href) . "'$class>$text</a>";
    8181            echo "\t<li id='" . esc_attr("tab-$callback") . "'>$link</li>\n";
    8282        }
     
    108108
    109109    if ( $url )
    110         $html = '<a href="' . clean_url($url) . "\"$rel>$html</a>";
     110        $html = '<a href="' . esc_url($url) . "\"$rel>$html</a>";
    111111
    112112    $html = apply_filters( 'image_send_to_editor', $html, $id, $alt, $title, $align, $url, $size );
     
    17461746else
    17471747    $class = '';
    1748 $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>'all', 'paged'=>false, 'm'=>false))) . "'$class>".__('All Types')."</a>";
     1748$type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type'=>'all', 'paged'=>false, 'm'=>false))) . "'$class>".__('All Types')."</a>";
    17491749foreach ( $post_mime_types as $mime_type => $label ) {
    17501750    $class = '';
     
    17561756        $class = ' class="current"';
    17571757
    1758     $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf(_n($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
     1758    $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf(_n($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
    17591759}
    17601760echo implode(' | </li>', $type_links) . '</li>';
     
    20602060function media_upload_flash_bypass() {
    20612061    echo '<p class="upload-flash-bypass">';
    2062     printf( __('You are using the Flash uploader.  Problems?  Try the <a href="%s">Browser uploader</a> instead.'), clean_url(add_query_arg('flash', 0)) );
     2062    printf( __('You are using the Flash uploader.  Problems?  Try the <a href="%s">Browser uploader</a> instead.'), esc_url(add_query_arg('flash', 0)) );
    20632063    echo '</p>';
    20642064}
     
    20752075        // the user manually selected the browser uploader, so let them switch back to Flash
    20762076        echo ' ';
    2077         printf( __('Try the <a href="%s">Flash uploader</a> instead.'), clean_url(add_query_arg('flash', 1)) );
     2077        printf( __('Try the <a href="%s">Flash uploader</a> instead.'), esc_url(add_query_arg('flash', 1)) );
    20782078    }
    20792079    echo "</p>\n";
Note: See TracChangeset for help on using the changeset viewer.