snipe / banbuilder Goto Github PK
View Code? Open in Web Editor NEWComposer package for censoring profanity in web applications, forums, etc.
Home Page: http://www.banbuilder.com
Composer package for censoring profanity in web applications, forums, etc.
Home Page: http://www.banbuilder.com
When having a word in my dictionary that is contains a "/", the plugin crashes with this error:
Warning: preg_replace_callback(): Unknown modifier '('
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
use Snipe\BanBuilder\CensorWords;
$censor = new CensorWords;
$string = $censor->censorString("analytics");
print_r($string);
result:
Array
(
[orig] => analytics
[clean] => ****ytics
[matched] => Array
(
[0] => anal
)
)
Maybe I'm missing something. Is there a way to avoid that or the script just match a bad word wherever it is in the sentence, even inside another word?
Thanks.
You've missed out the 7 as an option on the leet_replace['t'] on line 118.
This means one of your examples doesn't even get picked up!
Filter should take whole words into consideration as opposed to part of a text. For instance - "document" flags a cuss/swear word. Part of it contains "cum".
Here's the Weekly Digest for snipe/banbuilder:
Last week 2 issues were created.
Of these, 0 issues have been closed and 2 issues are still open.
๐ #73 Added Indonesia badwords, by SyahmiNawi
๐ #72 adding bad words bahasa malaysia, by wanadri
Last week, 2 pull requests were created, updated or merged.
Last week, 2 pull requests were opened.
๐ #73 Added Indonesia badwords, by SyahmiNawi
๐ #72 adding bad words bahasa malaysia, by wanadri
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ sitemapxml
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ dokaleo
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
I'm currently using this library. How can I let certain words pass? like 'hell' if I check 'Michelle' it thinks it is a bad word. How can I check for just 'hell' and/or let 'hell' be acceptable?
Do you have anything about the Scunthorpe problem ?
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, 2 pull requests were created, updated or merged.
Last week, 2 pull requests were updated.
๐ #58 Add multibyte support pattern, by gitlog
๐ #53 Makes whitelist comparison case-insensitive, by nick-sturrock
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ jpinnix
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
I would like to execute further actions if a bad word is found multiple times from the same user. How can I get a 1:0 if a string had a bad word or not?
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ foxlau
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
The current Release (2.2.3) contains a lot of syntax errors and does not work (missing de.php, errors in fi.php and no.php).
Can you please make a new release based on dev-master (that one works and has all the proper fixes)?
Why am I reporting this?
It would be nice to be able to use versions in composer without risk like "snipe/banbuilder": "2.2.*"
I am not a big fan of dev-master since I have suffered through broken package dependencies too much (especially in team projects with lotยดs of reinstalls) ;-)
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
I use mysqli for my banned words, but I'd much rather this, however it's difficult for my team who doesn't have access to the files to add new words, is there possible support to insert via PHP/MySQLi?
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ mirkodilucia
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week 1 issue was created.
It is still open.
๐ #58 Add multibyte support pattern, by gitlog
Last week, 1 pull request was created, updated or merged.
Last week, 1 pull request was opened.
๐ #58 Add multibyte support pattern, by gitlog
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ BananaCake2Day
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ voyula
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Whitelisting comparison is currently case sensitive, meaning that whitelisted words that are capitalised can fail the profanity check
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ lewisje
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were 2 stagazers.
โญ jittarao
โญ khachin
You all are the stars! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Hi, i have problem with this plugin.
if i write Hello World and the result return ****lo World
how to fix it?
After running composer update with "snipe/banbuilder": "dev-master" as a dependency I received the following error:
Loading composer repositories with package information
Updating dependencies (including require-dev)
[RuntimeException]
Could not load package snipe/banbuilder in http://packagist.org: [UnexpectedValueException] Could not parse version constraint >=2.6 <2.7: Invalid version string "2.6 <2.7"
[UnexpectedValueException]
Could not parse version constraint >=2.6 <2.7: Invalid version string "2.6 <2.7"
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]
I believe it has to do with a minor bug in your composor.json file.
Here's the Weekly Digest for snipe/banbuilder:
Last week 1 issue was created.
It is still open.
๐ #58 Add multibyte support pattern, by gitlog
Last week, 1 pull request was created, updated or merged.
Last week, 1 pull request was opened.
๐ #58 Add multibyte support pattern, by gitlog
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ BananaCake2Day
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ salifm
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
I created a PHP file and added some bad words using array_push().
when i input 'hello', it converts it into ****.
but i don't have hello word in the badwords array.
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ Barchid
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week 1 issue was created.
It is still open.
๐ #81 Update for Dutch (NL) words, by LTKort
Last week, 1 pull request was created, updated or merged.
Last week, 1 pull request was opened.
๐ #81 Update for Dutch (NL) words, by LTKort
Last week there were no commits.
Last week there were no contributors.
Last week there were 2 stagazers.
โญ LTKort
โญ fbxcelsior
You all are the stars! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
HI there,
is there any given restrictions for contributions? Do I have to translate every bad-word to english in a comment beside the word?
I want to add a german badword filter for banbuilder.
Do I only have to add the german filte and add it to a push-request?
Best regards
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
When I try to use multiple dictionaries using
$censor->setDictionary(array('en-us','it'));
It throws a 500 error
In vendor/snipe/banbuilder/src/CensorWords.php at line 147 -
$censorChecks = array();
for ($x = 0, $xMax = count($badwords); $x < $xMax; $x++) {
$censorChecks[$x] = $fullWords ? '/\b'.str_ireplace(array_keys($leet_replace),array_values($leet_replace), $badwords[$x]).'\b/i'
: '/'.str_ireplace(array_keys($leet_replace),array_values($leet_replace), $badwords[$x]).'/i';
}
$this->censorChecks = $censorChecks;
I tried the words $ex
and as$
, and they passed. Of course I have sex
and ass
on my filter list.
I'm taking a look on the code, and I'll try to PR a fix for this case soon.
Hi,
It is possible add more than one dictionary?
Thanks
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Would it be possible to make it so that if the replacer is a string, the bad word will be replaced by the string
for example if the replacer is set to "[censored]"
"go to hell." would turn into "go to [censored]."
Thanks
Hello world is translated as ****o world -- besides taking the word 'hell' from the dictionary what recommendations you have?
Thanks
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ aanelli
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
I have an app where users can add banwords through a form and I would like to add these to a custom dictionary file.
The way the dictionaries are provided atm as PHP code makes it quite difficult to append terms to them programmatically.
A format like CSV would be much easier to extend.
You could move the array_push($badwords,...
into the readBadWords method and get CSV or JSON dictionary contents via file_get_contents and then parse them?
EDIT: Thinking more about it, you might have implemented it as is for performance reasons because parsing dictionaries into arrays will take extra time?
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ askew-
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were 4 stagazers.
โญ jnbn
โญ zizther
โญ faytekin
โญ Pe46dro
You all are the stars! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there was 1 stargazer.
โญ deepakggoel
You are the star! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Here's the Weekly Digest for snipe/banbuilder:
Last week 1 issue was created.
It is still open.
๐ #58 Add multibyte support pattern, by gitlog
Last week, 1 pull request was created, updated or merged.
Last week, 1 pull request was opened.
๐ #58 Add multibyte support pattern, by gitlog
Last week there were no commits.
Last week there were no contributors.
Last week there were 2 stagazers.
โญ BananaCake2Day
โญ lonejack
You all are the stars! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository snipe/banbuilder to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
I'm using banbuilder in my Laravel 5 app.
When I try to run the censorString method I get the following error:
This is the code generating the error:
Validator::extend('filter_bad_words', function($attribute, $text, $parameters) {
$censor = new \Snipe\BanBuilder\CensorWords;
$langs = array('it');
$badwords = $censor->setDictionary($langs);
$string = $censor->censorString($text);
return sizeof( $string[ 'matched' ] ) <= 0;
});
Is the only solution increase the maximum execution time allowed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.