Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 18667)
+++ wp-includes/link-template.php	(working copy)
@@ -2355,21 +2355,44 @@
 }
 
 /**
- * Output rel=canonical for singular queries
+ * Output rel=canonical for home, singular, author archives, and taxonomy archives.
  *
  * @package WordPress
  * @since 2.9.0
 */
 function rel_canonical() {
-	if ( !is_singular() )
-		return;
+	
+	global $wp_query;
+	
+	/** Get the object ID */
+	$id = $wp_query->get_queried_object_id();
 
-	global $wp_the_query;
-	if ( !$id = $wp_the_query->get_queried_object_id() )
+	$canonical = '';
+
+	if ( is_front_page() ) {
+		$canonical = trailingslashit( home_url() );
+	}
+
+	if ( is_singular() ) {
+		$canonical = get_permalink( absint( $id ) );
+	}
+
+	if ( is_category() || is_tag() || is_tax() ) {
+		$canonical = get_term_link( absint( $id ), $wp_query->queried_object->taxonomy );
+	}
+
+	if ( is_author() ) {
+		$canonical = get_author_posts_url( absint( $id ) );
+	}
+	
+	$canonical = apply_filters( 'rel_canonical', $canonical, $id );
+
+	/** If empty, return nothing */
+	if ( ! $canonical )
 		return;
 
-	$link = get_permalink( $id );
-	echo "<link rel='canonical' href='$link' />\n";
+	printf( '<link rel="canonical" href="%s" />' . "\n", esc_url( $canonical ) );
+
 }
 
 /**