]> git.mxchange.org Git - friendica-addons.git/commitdiff
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 6897cb89077e099b1266efead83947f5f48971be..ccddb1e38a35297ff764d6c8f3a59af9a89ef4c7 100755 (executable)
Binary files a/nsfw.tgz and b/nsfw.tgz differ
index 0f94158bc83b19dd2d4b92623d808d9bf2be72fc..4a65b72089994063e8cde0c67ef3edb34faf8759 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) {