nsfw - use regex matching if word starts with '/'
This commit is contained in:
@@ -86,14 +86,21 @@ function nsfw_prepare_body(&$a,&$b) {
|
|||||||
if(! strlen(trim($word))) {
|
if(! strlen(trim($word))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(strpos($word,'/') === 0) {
|
||||||
if(stristr($b['html'],$word)) {
|
if(preg_match($word,$b['html'])) {
|
||||||
$found = true;
|
$found = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(stristr($b['item']['tag'], ']' . $word . '[' )) {
|
else {
|
||||||
$found = true;
|
if(stristr($b['html'],$word)) {
|
||||||
break;
|
$found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(stristr($b['item']['tag'], ']' . $word . '[' )) {
|
||||||
|
$found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user