#Bloxsom Plugin:AntiSpam #Author: Fletcher T. Penney #Version: 0.1 package antispam; # --- Configurable variables ---- # ------------------------------- $ignore = 0; $email = '[\w\.]+@\w+(\.\w+)+'; sub start { 1; } sub story { my ($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_; if ($$story_ref =~ m//gi || $$body_ref =~ m//gi) { $ignore = 1; } if ($ignore == 0) { while ($$body_ref =~ /($email)/ig) { $original=$1; $masked=""; @decimal = unpack('C*', $original); foreach $i (@decimal) { $masked.="&#".$i.";"; } $$body_ref =~ s/$original/$masked/ig; } } 1; } 1; __END__ =head1 NAME Blosxom Plug-in: antispam =head1 DESCRIPTION This plugin converts any email addresses in your stories into ascii code. It has no visible or functional effect, other than to change the html source code. So something like this: fletcher@hidden.domain Looks like this: fletcher@alumni.duke.edu But when viewed with a web browser, it is translated back into the expected human readable string. The idea is that some of the spambots can't read this. Though as this technique becomes more popular, I am sure that the spambots will catch on. But it can't hurt, right? =head1 TODO Figure out how to get this work with writebacks as well to hide email addresses that are submitted. =head1 BUGS None known; please send bug reports and feedback to the Blosxom development mailing list . =head1 AUTHOR Fletcher T. Penney http://fletcher.freeshell.org This plugin is now maintained by the Blosxom Sourceforge Team, . =head1 LICENSE This source is submitted to the public domain. Feel free to use and modify it. If you like, a comment in your modified source attributing credit to myself for my work would be appreciated. THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY OF ANY KIND. USE AT YOUR OWN RISK!