I'm displaying tag cloud on the homepage and I want to nofollow tags being displayed in the tag cloud. How do I go about it?

I guess this would require editing core file as I'm unable to find a plugin for this purpose.