@@ -95,20 +89,19 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
comment_author_email ) {
printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
} else {
_e( 'E-mail:' );
}
?> |
- |
+ |
" . __('visit site') . "";
+ if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
+ $link = '' . __('visit site') . '';
printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
} else {
_e( 'URL:' );
diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php
index 56e181afe..26f25564a 100644
--- a/wp-admin/includes/comment.php
+++ b/wp-admin/includes/comment.php
@@ -89,8 +89,8 @@ function get_comment_to_edit( $id ) {
$comment->comment_author = format_to_edit( $comment->comment_author );
$comment->comment_author_email = format_to_edit( $comment->comment_author_email );
- $comment->comment_author_url = esc_url($comment->comment_author_url);
$comment->comment_author_url = format_to_edit( $comment->comment_author_url );
+ $comment->comment_author_url = esc_url($comment->comment_author_url);
return $comment;
}
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index eb5ff4155..56678934a 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -2082,9 +2082,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
$author_url = get_comment_author_url();
if ( 'http://' == $author_url )
$author_url = '';
- $author_url_display = $author_url;
- $author_url_display = str_replace('http://www.', '', $author_url_display);
- $author_url_display = str_replace('http://', '', $author_url_display);
+ $author_url_display = preg_replace('|http://(www\.)?|i', '', $author_url);
if ( strlen($author_url_display) > 50 )
$author_url_display = substr($author_url_display, 0, 49) . '...';
diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
index 2b6b60ac9..c3858465c 100644
--- a/wp-includes/comment-template.php
+++ b/wp-includes/comment-template.php
@@ -194,6 +194,7 @@ function comment_author_IP() {
function get_comment_author_url() {
global $comment;
$url = ('http://' == $comment->comment_author_url) ? '' : $comment->comment_author_url;
+ $url = esc_url( $url, array('http', 'https') );
return apply_filters('get_comment_author_url', $url);
}
|