Download the PHP package simplygoodwork/curses without Composer
On this page you can find all versions of the php package simplygoodwork/curses. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simplygoodwork/curses
More information about simplygoodwork/curses
Files in simplygoodwork/curses
Package curses
Short Description A lightweight, developer-focused profanity filter for Craft CMS
License proprietary
Informations about the package curses
Curses!
Plugin for Craft CMS
A lightweight, developer-focused profanity filter for Craft CMS. Detect and mask inappropriate content in your frontend templates using advanced pattern matching.
Features
- Twig Filters -
maskProfanityandhasProfanityfor template use - Advanced Pattern Matching - Detects variations including substitutions, obscured text, and repeated letters
- Config-Based - Customize the word list via a simple config file
Requirements
- Craft CMS
4.0.0or later - PHP
8.0.2or later
Installation
Then install the plugin from the Control Panel or run:
Usage
Twig Filters
maskProfanity
Masks profanity in text using the configured mask character (default *):
hasProfanity
Check if text contains profanity:
Configuration
The plugin comes with a blank list of words. To customize:
- Copy
vendor/simplygoodwork/curses/src/config.phptoconfig/curses.php - Modify the settings as needed
The config file is multi-environment aware, so you can have different settings per environment.
Pattern Matching
The plugin detects various obfuscation techniques:
- Straight Match:
profanity - Substitution:
pr0f@n1ty(common letter replacements like a→@, e→3, i→1) - Obscured:
p-r-o-f-a-n-i-t-y(with separators like -, _, .) - Doubled:
pprrooffaanniittyy(repeated letters) - Combined:
p-r0f@n|tty(mix of techniques)
Performance
- Request-level caching - Patterns are compiled once per request
- Efficient regex - Single-pass matching for all word variations
- No database queries - Words loaded from config file
Changelog
See CHANGELOG.md
Support
Submit an issue on GitHub.
Brought to you by Good Work