Make WordPress Core


Ignore:
Timestamp:
05/02/2010 10:53:59 PM (16 years ago)
Author:
ryan
Message:

Escape links by default. Props alexkingorg. see #13051

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-widgets.php

    r14326 r14347  
    645645            <ul id="recentcomments"><?php
    646646            if ( $comments ) : foreach ( (array) $comments as $comment) :
    647             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>';
     647            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="' . get_comment_link($comment->comment_ID) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
    648648            endforeach; endif;?></ul>
    649649        <?php echo $after_widget; ?>
Note: See TracChangeset for help on using the changeset viewer.