jzavorohina / censure
Dirty russian/english words filter
1.3.0
2023-07-14 19:20 UTC
Requires
- php: >=5.0.0
Requires (Dev)
- php: >=7.3.0
- phpunit/phpunit: ^9
README
Dirty words - filter.
A PHP class to filter out dirty, vulgar, obscene, profane words in russian or english texts.
Key features:
- Find profanity (in Russian and English texts) and hide it with *** symbols.
- Find profanity (in Russian texts) and replace it with normative vocabulary.
Some examples:
// Searches if there any abusive words in the text Censure::is_bad('Original phrase with abusive words'); // return: bool // Replace abusive words from string Censure::replace('Original phrase with abusive words'); // return: string (cleaned text) // Clean indexes in $_POST from abusive words Censure::cleanPost('Unlimited number of arguments to match indexes in $_POST to clean'); // return: void // Fixing abusive words inside string Censure::fix('Original phrase with abusive words'); // return: string (fixed text)