juy/character-solver
Laravel middleware that converts specific HTML entities back into characters (e.g., ç→ç, ö→ö, ü→ü). Includes configurable translation map and an enable/disable flag; can run globally or be added manually to the HTTP Kernel.
ç → ç). This aligns well with Laravel’s middleware stack, where such transformations can be applied globally (e.g., request/response processing) or scoped to specific routes.$router->pushMiddlewareToGroup()).register()/boot() methods).Str::of() or html_entity_decode().html_entity_decode()?
Kernel.php or route-specific middleware).html_entity_decode() + config-driven rules.DOMPurify) might suffice.composer require juy/character-solver).config/app.php.php artisan vendor:publish.laravel/framework to ^8.0).boot() to use Laravel’s container binding (e.g., app()->bind()).pushMiddlewareToGroup() with middleware() in app/Http/Kernel.php.config/charactersolver.php) is compatible with Laravel’s filesystem./legacy) to validate behavior.& → &).ç)./api/v1).ç vs. ç) to avoid full-table scans.Str::of()->ascii()) or multibyte character handling.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Middleware breaks UTF-8 encoding | Corrupted text in responses | Test with sample strings (e.g., é → é). |
Double-decoding (e.g., ç) |
Unexpected output (ç → ç → ç but malformed) |
Add input validation or pre-processing. |
| Laravel version incompatibility | Package fails to load | Fork and update dependencies. |
| Custom config errors | No transformations applied | Validate config schema in CI/CD. |
| Performance degradation | Slow responses on high traffic | Profile middleware execution time. |
How can I help you explore Laravel packages today?