Make WordPress Core


Ignore:
Timestamp:
05/18/2009 04:00:33 PM (16 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/default-widgets.php

    r11380 r11383  
    660660            <ul id="recentcomments"><?php
    661661            if ( $comments ) : foreach ( (array) $comments as $comment) :
    662             echo  '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . clean_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
     662            echo  '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
    663663            endforeach; endif;?></ul>
    664664        <?php echo $after_widget; ?>
     
    731731            if ( empty($title) )
    732732                $title = htmlentities(strip_tags($rss->get_title()));
    733             $link = clean_url(strip_tags($rss->get_permalink()));
     733            $link = esc_url(strip_tags($rss->get_permalink()));
    734734            while ( stristr($link, 'http') != $link )
    735735                $link = substr($link, 1);
     
    740740
    741741        $title = apply_filters('widget_title', $title );
    742         $url = clean_url(strip_tags($url));
     742        $url = esc_url(strip_tags($url));
    743743        $icon = includes_url('images/rss.png');
    744744        if ( $title )
     
    814814        while ( stristr($link, 'http') != $link )
    815815            $link = substr($link, 1);
    816         $link = clean_url(strip_tags($link));
     816        $link = esc_url(strip_tags($link));
    817817        $title = esc_attr(strip_tags($item->get_title()));
    818818        if ( empty($title) )
     
    880880    $number = esc_attr( $number );
    881881    $title  = esc_attr( $title );
    882     $url    = clean_url( $url );
     882    $url    = esc_url( $url );
    883883    $items  = (int) $items;
    884884    if ( $items < 1 || 20 < $items )
     
    959959    if ( $items < 1 || 20 < $items )
    960960        $items = 10;
    961     $url           = sanitize_url(strip_tags( $widget_rss['url'] ));
     961    $url           = esc_url_raw(strip_tags( $widget_rss['url'] ));
    962962    $title         = trim(strip_tags( $widget_rss['title'] ));
    963963    $show_summary  = (int) $widget_rss['show_summary'];
     
    972972            $error = $rss->get_error_message();
    973973        } else {
    974             $link = clean_url(strip_tags($rss->get_permalink()));
     974            $link = esc_url(strip_tags($rss->get_permalink()));
    975975            while ( stristr($link, 'http') != $link )
    976976                $link = substr($link, 1);
Note: See TracChangeset for help on using the changeset viewer.