make nsfw less sensitive to leading/trailing whitespace in list of terms
authorfriendica <info@friendica.com>
Fri, 11 May 2012 04:35:48 +0000 (21:35 -0700)
committerfriendica <info@friendica.com>
Fri, 11 May 2012 04:35:48 +0000 (21:35 -0700)
nsfw.tgz
nsfw/nsfw.php

index 6897cb8..ccddb1e 100755 (executable)
Binary files a/nsfw.tgz and b/nsfw.tgz differ
index 0f94158..4a65b72 100755 (executable)
@@ -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) {