Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong detection #19

Open
olezhkafp opened this issue Dec 24, 2020 · 6 comments
Open

Wrong detection #19

olezhkafp opened this issue Dec 24, 2020 · 6 comments

Comments

@olezhkafp
Copy link

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.'

@Darthmaul
Copy link

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

@ConsoleTVs
Copy link
Owner

ConsoleTVs commented Mar 7, 2021

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

@olezhkafp
Copy link
Author

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
Copy link
Author

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)

@ConsoleTVs
Copy link
Owner

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

@sebastianheise
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants