From: minima Date: Wed, 21 Dec 2005 18:36:26 +0000 (+0000) Subject: fix BadWord to break on word boundaries X-Git-Tag: R_1_52~54 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e90c4070de00e403c4879d7e28e9d83592b5944;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($_); }