Index: wp-includes/default-widgets.php
===================================================================
--- wp-includes/default-widgets.php	(revision 12594)
+++ wp-includes/default-widgets.php	(working copy)
@@ -977,26 +977,34 @@
 	function widget( $args, $instance ) {
 		extract($args);
 		$title = apply_filters('widget_title', empty($instance['title']) ? __('Tags') : $instance['title']);
+		$use_nofollow_tag = $instance['use_nofollow_tag'] ? '1' : '0';
 
 		echo $before_widget;
 		if ( $title )
 			echo $before_title . $title . $after_title;
 		echo '<div>';
-		wp_tag_cloud(apply_filters('widget_tag_cloud_args', array()));
+		$tag_cloud_args = array('use_nofollow_tag' => $use_nofollow_tag);
+		wp_tag_cloud(apply_filters('widget_tag_cloud_args', $tag_cloud_args));
 		echo "</div>\n";
 		echo $after_widget;
 	}
 
 	function update( $new_instance, $old_instance ) {
 		$instance['title'] = strip_tags(stripslashes($new_instance['title']));
+		$instance['use_nofollow_tag'] = $new_instance['use_nofollow_tag'] ? 1 : 0;
 		return $instance;
 	}
 
 	function form( $instance ) {
+		// Defaults
+		$use_nofollow_tag = isset( $instance['use_nofollow_tag'] ) ? (bool) $instance['use_nofollow_tag'] : false;
+
 ?>
-	<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label>
-	<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php if (isset ( $instance['title'])) {echo esc_attr( $instance['title'] );} ?>" /></p>
-<?php
+		<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label>
+		<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php if (isset ( $instance['title'])) {echo esc_attr( $instance['title'] );} ?>" /></p>
+
+		<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('use_nofollow_tag'); ?>" name="<?php echo $this->get_field_name('use_nofollow_tag'); ?>"<?php checked( $use_nofollow_tag ); ?> />
+		<label for="<?php echo $this->get_field_id('use_nofollow_tag'); ?>"><?php _e( 'Use nofollow tag' ); ?></label><br /><?php
 	}
 }
 
Index: wp-includes/category-template.php
===================================================================
--- wp-includes/category-template.php	(revision 12594)
+++ wp-includes/category-template.php	(working copy)
@@ -618,7 +618,7 @@
 		'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0,
 		'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC',
 		'topic_count_text_callback' => 'default_topic_count_text',
-		'topic_count_scale_callback' => 'default_topic_count_scale', 'filter' => 1,
+		'topic_count_scale_callback' => 'default_topic_count_scale', 'filter' => 1, 'use_nofollow_tag' => false,
 	);
 
 	if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {
@@ -680,9 +680,13 @@
 		$tag_link = '#' != $tag->link ? esc_url( $tag->link ) : '#';
 		$tag_id = isset($tags[ $key ]->id) ? $tags[ $key ]->id : $key;
 		$tag_name = $tags[ $key ]->name;
-		$a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . esc_attr( $topic_count_text_callback( $real_count ) ) . "' style='font-size: " .
+		$href_tag = "<a href='$tag_link' class='tag-link-$tag_id' title='" . esc_attr( $topic_count_text_callback( $real_count ) ) . "' style='font-size: " .
 			( $smallest + ( ( $count - $min_count ) * $font_step ) )
-			. "$unit;'>$tag_name</a>";
+			. "$unit;'";
+		if ($args['use_nofollow_tag']) 
+			$href_tag = $href_tag . " rel='nofollow'";
+		$href_tag = $href_tag . ">$tag_name</a>";
+		$a[] = $href_tag;
 	}
 
 	switch ( $format ) :

