Switching to a Mac won't safe you. At least not in all cases.
The article clearly describes an example of somebody who surfed to a warez site that after a certain period of time begins connecting to porn sites. And this can be also be used against you when you use a Macintosh web browser.
Recent studies claim that Firefox and Safari are much more insecure than Internet Explorer 8, which, as the Mozilla Foundation says, in part is based upon the fact that the source code of the core engines of Firefox and Safari is open and free to read for anybody who is looking for security holes to exploit. And unlike OS X, Firefox has reached a significant enough market share that makes it an attractive target.
Now simply do the math: Darwin, the Open Source foundation of OS X, is also open for everyone to read and analyze.
You shouldn't feel too safe just because you use a Mac.
PS: Above information is based upon an article from the German Heise website. If you are capable of understanding German, just visit
www.heise.de and read it up. You'll probably find enough English information about that topic somewhere else on the net.