mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Make spamfilter case-insensitive
This commit is contained in:
parent
1d0fb32923
commit
19dfa9a146
1 changed files with 2 additions and 2 deletions
|
|
@ -80,11 +80,11 @@ class spamfilterModel extends spamfilter
|
|||
$word_list = $this->getDeniedWordList();
|
||||
if(!count($word_list)) return new BaseObject();
|
||||
|
||||
$text = utf8_trim(utf8_normalize_spaces(htmlspecialchars_decode(strip_tags($text, '<a><img>'))));
|
||||
$text = strtolower(utf8_trim(utf8_normalize_spaces(htmlspecialchars_decode(strip_tags($text, '<a><img>')))));
|
||||
foreach ($word_list as $word_item)
|
||||
{
|
||||
$word = $word_item->word;
|
||||
if (strpos($text, $word) !== false)
|
||||
if (strpos($text, strtolower($word)) !== false)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->word = $word;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue