diff --git a/wp-includes/template-functions-comment.php b/wp-includes/template-functions-comment.php index 8a3db247f7..10a86a70db 100644 --- a/wp-includes/template-functions-comment.php +++ b/wp-includes/template-functions-comment.php @@ -21,7 +21,7 @@ add_filter('comment_excerpt', 'remove_slashes', 5); add_filter('comment_excerpt', 'convert_chars'); function clean_url($url) { - $url = str_replace('http://url', '', $url); + if ('' == $url) return $url; $url = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $url); $url = str_replace(';//', '://', $url); $url = (!strstr($url, '://')) ? 'http://'.$url : $url; @@ -122,17 +122,13 @@ function comment_author_link() { global $comment; $url = apply_filters('comment_url', $comment->comment_author_url); $author = apply_filters('comment_author', $comment->comment_author); + if (!$author) $author = 'Anonymous'; - if (empty($url) && empty($email)) { - echo 'Anonymous'; - return; - } - - echo '' . $author . ''; + if (empty($url)) : + echo $author; + else: + echo "$author"; + endif; } function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') {