Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 10733)
+++ wp-includes/general-template.php	(working copy)
@@ -1444,29 +1444,44 @@
 
 	if ( is_single() || is_page() ) {
 		$post = &get_post( $id = 0 );
-		if ( comments_open() || pings_open() || $post->comment_count > 0 )
-			echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . attribute_escape(sprintf( $args['singletitle'], get_bloginfo('name'), $args['seperator'], wp_specialchars( get_the_title() ) )) . '" href="' . get_post_comments_feed_link( $post->ID ) . "\" />\n";
+
+		if ( comments_open() || pings_open() || $post->comment_count > 0 ) {
+			$title = attribute_escape(sprintf( $args['singletitle'], get_bloginfo('name'), $args['seperator'], wp_specialchars( get_the_title() ) ));
+			$href = get_post_comments_feed_link( $post->ID );
+		}
 	}
 
 	elseif ( is_category() ) {
 		$cat_id = intval( get_query_var('cat') );
-		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . attribute_escape(sprintf( $args['cattitle'], get_bloginfo('name'), $args['seperator'], get_cat_name( $cat_id ) )) . '" href="' . get_category_feed_link( $cat_id ) . "\" />\n";
+
+		$title = attribute_escape(sprintf( $args['cattitle'], get_bloginfo('name'), $args['seperator'], get_cat_name( $cat_id ) ));
+		$href = get_category_feed_link( $cat_id );
 	}
 
 	elseif ( is_tag() ) {
 		$tag_id = intval( get_query_var('tag_id') );
 		$tag = get_tag( $tag_id );
-		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . attribute_escape(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['seperator'], $tag->name )) . '" href="' . get_tag_feed_link( $tag_id ) . "\" />\n";
+
+		$title = attribute_escape(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['seperator'], $tag->name ));
+		$href = get_tag_feed_link( $tag_id );
 	}
 
 	elseif ( is_author() ) {
 		$author_id = intval( get_query_var('author') );
-		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . attribute_escape(sprintf( $args['authortitle'], get_bloginfo('name'), $args['seperator'], get_author_name( $author_id ) )) . '" href="' . get_author_feed_link( $author_id ) . "\" />\n";
+
+		$title = attribute_escape(sprintf( $args['authortitle'], get_bloginfo('name'), $args['seperator'], get_author_name( $author_id ) ));
+		$href = get_author_feed_link( $author_id );
 	}
 
 	elseif ( is_search() ) {
-		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . attribute_escape(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['seperator'], get_search_query() )) . '" href="' . get_search_feed_link() . "\" />\n";
+		$title = attribute_escape(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['seperator'], get_search_query() ));
+		$href = get_search_feed_link();
 	}
+
+	if ( empty($title) || empty($href) )
+		return;
+
+	echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . $title . '" href="' . $href . "\" />\n";
 }
 
 /**
