fixed bug in comment_author_link.

git-svn-id: http://svn.automattic.com/wordpress/trunk@193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-06-08 10:12:50 +00:00
parent faadf27271
commit 0e1ccae1a1
1 changed files with 7 additions and 4 deletions

View File

@ -979,16 +979,19 @@ function comment_author_link() {
$author = stripslashes(&$comment->comment_author);
$url = str_replace('http://url', '', $url);
if (empty($url) && empty($email)) return $author;
if (empty($url) && empty($email)) {
echo $author;
return;
}
echo '<a href="';
if ($url) {
$url = str_replace(';//', '://', $url);
$url = (!strstr($url, '://')) ? 'http://'.$url : $url;
$url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&#038;$1', $url);
echo $url;
else echo $url;
} else {
echo antispambot($email);
echo 'mailto:'.$email;
}
echo '" rel="external">' . $author . '</a>';
}