Profanity icon indicating copy to clipboard operation
Profanity copied to clipboard

Wrong detection

Open olezhkafp opened this issue 4 years ago • 6 comments

Hi. for example we have string like this:

$value = '<p><span style="color: rgb(246,139,106);">Lauren J.</span>, Hi</p>';

In this case 139 will be replaced as *** because:

Profanity::blocker(trim($value))->badWords() detects the bad word:

Array
(
    [2261] => Array
        (
            [language] => zh
            [word] => 13.
        )
)

Is it possible to fix? as '139' != '13.'

olezhkafp avatar Dec 24 '20 13:12 olezhkafp

Hey @olezhkafp did you ever figure out a fix for this? We are facing this issue as well

Darthmaul avatar Mar 06 '21 21:03 Darthmaul

Hello sorry for the issue. Could we perhaps remove this word from the blocked list? I have no idea about that language but looks odd

ConsoleTVs avatar Mar 07 '21 15:03 ConsoleTVs

Hey @olezhkafp did you ever figure out a fix for this? We are facing this issue as well

@Darthmaul Yes, we care copied the json file with the bad words, modified it and use instead of basic one.

olezhkafp avatar Mar 07 '21 17:03 olezhkafp

Hello sorry for the issue. Could we perhaps remove this word from the blocked list? I have no idea about that language but looks odd

@ConsoleTVs yes, looks like this is some issue and not the bad word. I think "13." can not be some bad word)

olezhkafp avatar Mar 07 '21 17:03 olezhkafp

Hey guys, care to test version 3.0.3 with a potential fix?

ConsoleTVs avatar Mar 08 '21 02:03 ConsoleTVs

I know this is solved, but I'd just like to add a guess here: With the dot in regex it could have been an issue with incorrect (or no) escaping, making it a one character wildcard 13. => 130, 131, 132, 13A, etc.

sebastianheise avatar Apr 12 '22 07:04 sebastianheise