]> dxcluster.net Git - spider.git/commitdiff
fix BadWord to break on word boundaries
authorminima <minima>
Wed, 21 Dec 2005 18:36:26 +0000 (18:36 +0000)
committerminima <minima>
Wed, 21 Dec 2005 18:36:26 +0000 (18:36 +0000)
perl/BadWords.pm

index df6a15571e112f14864960723aafacf621d19ec2..3d7404387664d34ffe7e44cda5d7380a31f2ccd2 100644 (file)
@@ -106,7 +106,7 @@ sub check
        
        return @out if @out;
        
-       for (split(/\s+/, $s)) {
+       for (split(/\b/, $s)) {
                s/\'?S$//;
                push @out, $_ if $badword->in($_);
        }