]> git.mxchange.org Git - friendica-addons.git/blobdiff - nsfw/nsfw.php
make nsfw less sensitive to leading/trailing whitespace in list of terms
[friendica-addons.git] / nsfw / nsfw.php
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) {