fix split on simple words so that it splits on word boundaries
[spider.git] / perl / BadWords.pm
index df6a15571e112f14864960723aafacf621d19ec2..c21fe975d68c00d625f447629472eb8563561f24 100644 (file)
@@ -106,8 +106,7 @@ sub check
        
        return @out if @out;
        
-       for (split(/\s+/, $s)) {
-               s/\'?S$//;
+       for (split(/\b/, $s)) {
                push @out, $_ if $badword->in($_);
        }