Make WordPress Core


Ignore:
Timestamp:
07/18/2009 11:21:50 PM (15 years ago)
Author:
azaozz
Message:

Properly escape comment_author_url when displaying, for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-comment.php

    r11383 r11721  
    2525<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
    2626<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
    27 <?php
    28 
    29 $email = esc_attr( $comment->comment_author_email );
    30 $url = esc_attr( $comment->comment_author_url );
    31 // add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core');
    32 ?>
    3327
    3428<div id="side-info-column" class="inner-sidebar">
     
    9690    <td class="first">
    9791    <?php
    98         if ( $email ) {
     92        if ( $comment->comment_author_email ) {
    9993            printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
    10094        } else {
     
    10296        }
    10397?></td>
    104     <td><input type="text" name="newcomment_author_email" size="30" value="<?php echo esc_attr($email); ?>" tabindex="2" id="email" /></td>
     98    <td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" tabindex="2" id="email" /></td>
    10599</tr>
    106100<tr valign="top">
    107101    <td class="first">
    108102    <?php
    109         $url = get_comment_author_url();
    110         if ( ! empty( $url ) && 'http://' != $url ) {
    111             $link = "<a href='$url' rel='external nofollow' target='_blank'>" . __('visit site') . "</a>";
     103        if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
     104            $link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>';
    112105            printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
    113106        } else {
Note: See TracChangeset for help on using the changeset viewer.