mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Strip HTML and normalize spaces before checking text for blocked words
This commit is contained in:
parent
68c0ce3ae6
commit
b4d7d4e2c0
1 changed files with 2 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ class spamfilterController extends spamfilter
|
|||
{
|
||||
$text = $obj->title . ' ' . $obj->content . ' ' . $obj->nick_name . ' ' . $obj->homepage . ' ' . $obj->tags;
|
||||
}
|
||||
$text = utf8_trim(utf8_normalize_spaces(htmlspecialchars_decode(strip_tags($text))));
|
||||
$output = $oFilterModel->isDeniedWord($text);
|
||||
if(!$output->toBool()) return $output;
|
||||
// Check the specified time beside the modificaiton time
|
||||
|
|
@ -89,7 +90,6 @@ class spamfilterController extends spamfilter
|
|||
$output = $oFilterModel->isDeniedIP();
|
||||
if(!$output->toBool()) return $output;
|
||||
// Check if there is a ban on the word
|
||||
$text = '';
|
||||
if($is_logged)
|
||||
{
|
||||
$text = $obj->content;
|
||||
|
|
@ -98,6 +98,7 @@ class spamfilterController extends spamfilter
|
|||
{
|
||||
$text = $obj->content . ' ' . $obj->nick_name . ' ' . $obj->homepage;
|
||||
}
|
||||
$text = utf8_trim(utf8_normalize_spaces(htmlspecialchars_decode(strip_tags($text))));
|
||||
$output = $oFilterModel->isDeniedWord($text);
|
||||
if(!$output->toBool()) return $output;
|
||||
// If the specified time check is not modified
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue