NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #3780 most downloaded on Packagist
Blasp is a powerful and customisable profanity filter package for Laravel applications
Latest stable
v4.5.0
Last release 19 days ago
03 Nov 2026
Release timing varies
gaps range from 2 weeks to 7 months
Most releases are documented
notes for 24 of 27 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
27 releases · first in 2024
Drag across the ruler to compare, or tap a release to open it.
Hindi and Nepali, opt-in lookalike folding, and a set of word-list and config additions, all contributed by @prolaxu (split from #53 into #59–#63). Th
Hindi and Nepali, opt-in lookalike folding, and a set of word-list and config additions, all contributed by @prolaxu (split from #53 into #59–#63). Thank you!
Nothing here changes results for single-language checks with default config, except for one small improvement to accented Latin text (below). inAllLanguages() now includes Hindi and Nepali.
Blasp::hindi(), Blasp::nepali(), or Blasp::in('english', 'hindi').
DevanagariNormalizer.homoglyphs folds Cyrillic and Greek lookalikes, fullwidth letters and unlisted accented letters before matching, so fuсk (Cyrillic с) and fuck are caught. The original text is what gets masked.
ext-intl or symfony/polyfill-intl-normalizer (suggested, not required).extended_substitutions adds 1→l, 7/+→t and 2→z.flexible_phrases makes a space in a list entry match any separator or none (sieg heil, sieg-heil, siegheil).substitutions_append (#62) adds characters to the substitution table without copying the whole table:'substitutions_append' => ['/u/' => ['v']], // "fvck" now matches
spoof, clitoris, cream pie, …).मा-दर-चोद matches like f-u-c-k.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Far fewer false positives, nested middleware input, documented config keys that now work, and loud failures instead of silently filtering nothing. Thi
Far fewer false positives, nested middleware input, documented config keys that now work, and loud failures instead of silently filtering nothing. This release changes what gets flagged: see Upgrading to 4.4 before updating. (#58)
On a corpus of 67 clean sentences built from reported cases, 37 were flagged on v4.3.2 and 3 are now.
UnknownLanguageException. Blasp::in('englsh') or a misspelt BLASP_LANGUAGE used to flag nothing. Names are now case-insensitive.blasp.severity and blasp.false_positives are applied. Both were documented but ignored.
severity sets the default minimum; the default, mild, changes nothing. An invalid value throws.false_positives (and configure()'s) now apply to every language.comment.body, tags.0), and every offending field is reported.uniqueWords() / MatchedWord::$base.false_positives.*: ***** ratings, ******** passwords, **bold**, *italic*. "f***" and "f*ck" still match.pipeline): ordinary prose went from 35 and 22 flagged words to 0 and 4, and sound-alike evasions like "phuck" and "phag" are still caught.max_length (BLASP_MAX_LENGTH, off by default): the middleware and validation rule reject longer text instead of checking it. There's also Profanity::maxLength(n).illuminate/support ^10–^13.A hardening release from a full review of v4.3.1. Everything here stops input from tying up a worker, fixes output that was wrong, or speeds checks up
A hardening release from a full review of v4.3.1. Everything here stops input from tying up a worker, fixes output that was wrong, or speeds checks up. Results for normal text are unchanged: a differential run of 3,337 texts against v4.3.1 found no new and no lost detections. No API changes. (#57)
aaaa…, !!!!… or o*o*… made checks take seconds to minutes. This was reachable through the middleware, the validation rule and Blaspable. Checks now scale linearly: 2 KB of a went from 10.5 s to 31 ms.'!' x 2000 . ' you lickme' was not flagged. The text is now rescanned in windows instead.block(''), or explode(',', env(...)) returning ['']. Blank words are now ignored."fück fück" was "**** f***". Later words are no longer missed either."fück and shit" was "******nd ****".İ).blasp:clear now clears every cached result.ProfanityDetected now fires on cached checks too.Blaspable:
array/json attributes are no longer corrupted on save.Blasp::withoutFiltering() turns filtering back on afterwards.blasp middleware work after Blasp::fake().strict() now forces the regex driver, as documented.Profanity::in(), ::maxScore() and ::severity() work statically, as documented, and still chain on an instance.inAllLanguages(): about 22 ms instead of about 140 ms.Tip: cap input length before checking, e.g. ['bail', 'string', 'max:5000', Profanity::in('english')].
Masks landing on the wrong characters (#56): the regex and phonetic drivers matched against normalized text but masked the original at the same positi
ä/ö/ü/ß and schllœ/æ| Input | Before | After |
|---|---|---|
a fuck this shit |
a ****k thi****it |
a **** this **** |
Du blöde Scheiße, du Arschloch |
Du ******S******* du A******** |
Du ***** *******, du ********* |
llama mierda |
llama******a |
llama ****** |
Matched word text, positions and clean() now all refer to the right characters. No API changes.
Blocked words now match inside longer words (#52): words passed to block() or set in the block config are caught inside longer words, so block('applea
block() or set in the block config are caught inside longer words, so block('appleacre') flags crappleacre and block('foo') flags fooapple. Dictionary words still skip embedded matches (classroom stays clean), and allow() still overrides a blocked word.Blasp::block('scam')->check('scampi'); // now flagged
Blasp::block('scam')->allow('scampi')->check('scampi'); // clean
clean() and original() no longer break emoji like 💆♀️. Invisible format characters are still stripped before matching, so fuck is still caught, but only the masked words change in the returned text. Match positions now refer to the original text.mask() now run once per match when the text contains invisible format characters.Dutch language support (#47, thanks @roelti): a Dutch word list with severity tiers, false positives, and a DutchNormalizer that handles Dutch diacrit
DutchNormalizer that handles Dutch diacritics.Blasp::dutch()->check($text);
Blasp::in('english', 'dutch')->check($text);
Blasp::inAllLanguages()->check($text); // now includes Dutch
kon, rot, zak, ballen, aftrekken, …) are left out to avoid false positives.kanker, tering and tyfus are included as they are the most common Dutch curses. Use allow() if you need to permit them, for example in medical content.Embedded profanity matching (opt-in): flag profanity inside longer words, for inputs without spaces such as usernames, slugs and short codes (myshit,
myshit, qcuntz). Default behaviour is unchanged. (#54, thanks @BHMSD-bdailey)Blasp::matchEmbedded()->check($text);
Or enable it for every check in config/blasp.php:
'match_embedded' => env('BLASP_MATCH_EMBEDDED', false),
pipeline() checks inherit it.classroom and assignment stay clean.matchEmbedded(false) overrides a config value of true.Related: #32, #51
Invisible Unicode bypass: Strip \p{Cf} format characters (zero-width spaces, invisible separators) from input before processing, so profanity like fu
\p{Cf} format characters (zero-width spaces, invisible separators) from input before processing, so profanity like fuck (with U+2063) is correctly detected* as a universal letter substitution so censored profanity like f*g, s**t, f**k is detected\x01 instead of * for internal masking during detection loop to prevent re-matching masked textpreg_replace returning null on malformed UTF-8 inputA ground-up rewrite with a driver-based architecture, severity scoring, and deep Laravel integration.
A ground-up rewrite with a driver-based architecture, severity scoring, and deep Laravel integration.
regex (obfuscation/substitution detection), pattern (fast exact matching), phonetic (sound-alike evasion via metaphone + Levenshtein), and pipeline (chain multiple drivers together). Extend with custom drivers.*, #), grawlix (!@#$%), or a custom callback.Blaspable trait auto-sanitizes or rejects profanity on model save, with withoutBlaspChecking() for bypassing.CheckProfanity middleware to reject or sanitize profane request fields with configurable severity and field filtering.blasp_check rule with language support.@clean($text) for output sanitization.Str::isProfane(), Str::cleanProfanity(), and Stringable equivalents.ProfanityDetected, ContentBlocked, ModelProfanityDetected.Blasp::fake() for test doubles with assertions.Blaspsoft\Blasp\Laravel\ merged into Blaspsoft\Blasp\. Update any direct class references.ServiceProvider → BlaspServiceProvider (auto-discovery handles this).config/config.php → config/blasp.php. Re-publish with php artisan vendor:publish --tag="blasp-config".check() now returns a Result object with isOffensive(), clean(), score(), severity(), count(), words(), uniqueWords(). Previous methods like hasProfanity(), getCleanString(), getProfanitiesCount() are removed.https://github.com/Blaspsoft/blasp/compare/v3.1.9...v4.0.0
Fix false positives when profanity is a substring of a regular word — Words like space, spacious, aerospace, workspace were incorrectly flagged becaus
space, spacious, aerospace, workspace were incorrectly flagged because the profanity spac matched as a substring. Instead of adding more words to the false positives list, a systematic check now automatically skips pure alphabetic profanity matches embedded inside larger regular words.spac, fuck, ass)sp@c, f-u-c-k, a$$)fucks, fucker, fuckings)cuntfuck, fuckingshitcuntfuck)ccuunntt, fuuuck)space, spacious, aerospace, cocktails, class, etc.)Closes #32
Fixed false positives when profanity detection incorrectly matched across separate words:
"an alert" no longer flags "anal""has 5 faces" no longer flags "ass"The fix distinguishes between intentional obfuscation (like "@ss" which contains letters + special characters) and accidental word combinations (like "an al" which contains only letters).
isSpanningWordBoundary() logic to check if standalone portions contain both letters AND non-letter charactersfix: detect partial spacing profanity obfuscation - Profanity obfuscation using partial spacing is now correctly detected:
fix: detect partial spacing profanity obfuscation - Profanity obfuscation using partial spacing is now correctly detected:
"s hit" → detected as "shit""f uck" → detected as "fuck""t wat" → detected as "twat""fu c k" → detected as "fuck""tw a t" → detected as "twat"fix: convert byte offset to character offset for multibyte support - Fixed boundary checks to work correctly with multibyte characters (accented letters in French, German, etc.)
The isSpanningWordBoundary() method was refactored to check surrounding context instead of relying on heuristics about single-character parts. This ensures partial spacing obfuscation is detected while still preventing false positives like "This musicals hit".
Full Changelog: https://github.com/Blaspsoft/blasp/compare/v3.1.6...v3.1.7
Fix accented character false positives (#24): Added /u (PCRE_UTF8) flag to generated profanity regex patterns, preventing multi-byte UTF-8 characters
/u (PCRE_UTF8) flag to generated profanity regex patterns, preventing multi-byte UTF-8 characters (e.g. ê, é) from being matched byte-by-byte and causing false positives on words like "tête" and "aré".check() entry point to sanitize non-UTF-8 strings before regex matching, preventing silent preg_match failures.check() no longer throws on empty/null strings (#29, #42) — Blasp::check() now accepts ?string and returns a clean result for empty or null input inst
Blasp::check() now accepts ?string and returns a clean result for empty or null input instead of throwing an exception.Fix false positive detection for common words (#32) — Words like "assignment", "passion", "classroom", "passenger" were incorrectly flagged because th
false_positives list covering substrings: ass, tit, cum, nig, rap, nob.Fix UUID flagged as profanity (#23) — UUIDs like 6ec3e80f-...-144a2ef5800b were incorrectly flagged because 800b mapped to boob via character substitu
6ec3e80f-...-144a2ef5800b were incorrectly flagged because 800b mapped to boob via character substitutions. Added an isInsideHexToken() guard that skips matches inside UUIDs, MD5/SHA hashes, and other long hex strings while leaving normal profanity detection intact.Fix circular substitution handling (#35) — Replaced sequential preg_replace with a single-pass character walker that prevents circular substitutions (
preg_replace with a single-pass character walker that prevents circular substitutions (e.g., French c→k and k→c) from producing malformed regex. Multi-char substitution values now use alternation instead of character classes. Language-specific substitutions are properly merged again.Fixed spaced profanity detection (#36) - Spaced-out obfuscation like f u c k i n g is now correctly detected as profanity
f u c k i n g is now correctly detected as profanityThe isSpanningWordBoundary() method was incorrectly rejecting intentional obfuscation where characters are separated by spaces. The fix distinguishes between:
$result = Blasp::check('This is f u c k 1 n g awesome!');
$result->hasProfanity; // true ✅
Full Changelog: https://github.com/Blaspsoft/blasp/compare/v3.1.0...v3.1.1
You can now specify a custom cache driver for Blasp, which is particularly useful for environments like Laravel Vapor where the default cache driver (
You can now specify a custom cache driver for Blasp, which is particularly useful for environments like Laravel Vapor where the default cache driver (DynamoDB) has size limits that can be exceeded when caching profanity expressions.
Set via config:
// config/blasp.php
'cache_driver' => env('BLASP_CACHE_DRIVER'),
Or via environment variable:
BLASP_CACHE_DRIVER=redis
This feature was originally proposed by @dimzeta in #25 and has been adapted for Blasp v3.0 architecture.
Full Changelog: https://github.com/Blaspsoft/blasp/compare/v3.0.0...v3.1.0
This is a major release with breaking changes from v2.x:
Blasp v3.0.0 introduces comprehensive multi-language support and a completely refactored architecture for improved performance and extensibility.
maskWith() method for customizable censoring characterscomposer require blaspsoft/blasp
use Blasp\Facades\Blasp;
// English (default)
$hasProfanity = Blasp::check('some text');
$cleanText = Blasp::clean('some text');
// Multi-language support
$hasProfanity = Blasp::language('spanish')->check('texto aquí');
$cleanText = Blasp::language('french')->clean('texte ici');
// Custom mask characters
$masked = Blasp::maskWith('❌')->clean('bad words here');
This is a major release with breaking changes from v2.x:
Please review the documentation for migration details.
https://github.com/Blaspsoft/blasp/blob/main/CHANGELOG.md
maskWith() methodSimplified the configure method in BlaspService class by removing unnecessary null parameter
configure method in BlaspService class by removing unnecessary null parameterModified src/BlaspService.php:
BlaspService configurationThis update is fully backwards compatible with v2.0.0. No changes are required in existing implementations.
🚀 Added caching system for improved performance
configure() method for custom profanity and false positive listsphp artisan blasp:clear command to clear cacheYou can now specify custom profanity and false positive lists which override the default config:
$blasp = Blasp::configure(
profanities: $your_custom_list ,
falsePositives: $your_custom_false_positives
)->check($text);
The configuration file now supports:
If you're upgrading from v1.x, you'll need to:
configure() method for custom listsThis patch release focuses on resolving bugs and improving regex handling for better profanity detection accuracy.
This patch release focuses on resolving bugs and improving regex handling for better profanity detection accuracy.
a$$) were not correctly masked due to special character handling in regex.afuckb).v1.2.x.Nothing published for this version
Nothing published for this version
Nothing published for this version
- initial release
One column per month.