From: minima Date: Wed, 21 Dec 2005 18:36:26 +0000 (+0000) Subject: fix BadWord to break on word boundaries X-Git-Tag: 1.53~110 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a23a8576e79859f0108072a9f780d1b3a9383278;p=spider.git fix BadWord to break on word boundaries --- diff --git a/perl/BadWords.pm b/perl/BadWords.pm index df6a1557..3d740438 100644 --- a/perl/BadWords.pm +++ b/perl/BadWords.pm @@ -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($_); }