--- NaughtyFilter.cpp.orig 2009-07-23 23:03:13.000000000 -0400 +++ NaughtyFilter.cpp 2009-07-24 19:13:43.000000000 -0400 @@ -85,6 +85,18 @@ // check the given document body for banned, weighted, and exception phrases (and PICS, and regexes, &c.) void NaughtyFilter::checkme(DataBuffer *body, String &url, String &domain) { + // skip content scan on JavaScript and style sheets + url.hexDecode(); /* superfluous? */ + String urll; + urll = url; + urll.toLower(); + if (urll.contains("?")) + urll = urll.before("?"); + + if (urll.length() >= 4) + if (urll.endsWith(".js") || urll.endsWith(".css")) + return; + // original data off_t rawbodylen = (*body).buffer_length; char *rawbody = (*body).data; @@ -827,7 +839,7 @@ return; } - if (weighting > (*o.fg[filtergroup]).naughtyness_limit) { + if (weighting < (*o.fg[filtergroup]).naughtyness_limit) { isItNaughty = true; whatIsNaughtyLog = o.language_list.getTranslation(402); // Weighted phrase limit of