make nsfw less sensitive to leading/trailing whitespace in list of terms

This commit is contained in:
friendica 2012-05-10 21:35:48 -07:00
parent bdbc3a2625
commit e533312985
2 changed files with 2 additions and 1 deletions

BIN
nsfw.tgz

Binary file not shown.

View file

@ -94,7 +94,8 @@ function nsfw_prepare_body(&$a,&$b) {
$found = false; $found = false;
if(count($arr)) { if(count($arr)) {
foreach($arr as $word) { foreach($arr as $word) {
if(! strlen(trim($word))) { $word = trim($word);
if(! strlen($word)) {
continue; continue;
} }
if(strpos($word,'/') === 0) { if(strpos($word,'/') === 0) {