From: friendica Date: Fri, 11 May 2012 04:35:48 +0000 (-0700) Subject: make nsfw less sensitive to leading/trailing whitespace in list of terms X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e5333129856323b6bb28cce25c86f1a26e868f43;p=friendica-addons.git make nsfw less sensitive to leading/trailing whitespace in list of terms --- diff --git a/nsfw.tgz b/nsfw.tgz index 6897cb89..ccddb1e3 100755 Binary files a/nsfw.tgz and b/nsfw.tgz differ diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 0f94158b..4a65b720 100755 --- a/nsfw/nsfw.php +++ b/nsfw/nsfw.php @@ -94,7 +94,8 @@ function nsfw_prepare_body(&$a,&$b) { $found = false; if(count($arr)) { foreach($arr as $word) { - if(! strlen(trim($word))) { + $word = trim($word); + if(! strlen($word)) { continue; } if(strpos($word,'/') === 0) {