<?php
/*
Plugin Name: Nofollow Tag Cloud
Plugin URI: http://wordpress.org/support/topic/144400
Description: Inserts rel='nofollow' in links generated by wp_tag_cloud(), and optionally the_tags().
Version: R1
Author: Kaf Oseo
Author URI: http://szub.net

    Copyright (c) 2007 Kaf Oseo (http://szub.net)
    Nofollow Tag Cloud is released under the GNU General Public
    License http://www.gnu.org/licenses/gpl.txt

    This is a WordPress 2.3 plugin (http://wordpress.org).
*/

function szub_nofollow_tag($text) {
    return 
str_replace('<a href=''<a rel="nofollow" href=',  $text);    
}

add_filter('wp_tag_cloud''szub_nofollow_tag');
// add_filter('the_tags', 'szub_nofollow_tag');  // uncomment this line to hit tag links from the_tags()
?>