Index: wp-includes/category-template.php
===================================================================
--- wp-includes/category-template.php	(revision 19983)
+++ wp-includes/category-template.php	(working copy)
@@ -1109,7 +1109,7 @@
 		$link = get_term_link( $term, $taxonomy );
 		if ( is_wp_error( $link ) )
 			return $link;
-		$term_links[] = '<a href="' . $link . '" rel="tag">' . $term->name . '</a>';
+		$term_links[] = '<a href="' . esc_url( $link ) . '" rel="tag">' . $term->name . '</a>';
 	}
 
 	$term_links = apply_filters( "term_links-$taxonomy", $term_links );
