Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jolitypo Laravel Package

jolicode/jolitypo

JoliTypo is a PHP typography fixer that cleans up HTML fragments: smart quotes, dashes, ellipses, non-breaking spaces, and French typography rules. It offers customizable fixers and works well in Laravel or any PHP project.

View on GitHub
Deep Wiki
Context7

Microtypography fixer for the web.

Frequently asked questions about Jolitypo
How do I install jolicode/jolitypo in a Laravel application?
Install it with Composer using composer require jolicode/jolitypo. Because the package is framework-agnostic, you then wrap it in a small application service or bind it in a service provider so your controllers and Blade templates never reference the vendor class directly. Publishing a config/typography.php file with an enabled flag, locale map, and excluded tags keeps the integration tidy.
Which Laravel versions does JoliTypo support?
JoliTypo has no Laravel coupling at all, so it is compatible with any Laravel version whose PHP constraint the package satisfies. Check the composer.json PHP requirement of the release you install and confirm it matches your deployed runtime. There is no service container assumption, no database or queue dependency, and no framework-specific code to break on upgrade.
Is JoliTypo safe on full HTML, or will it break my markup?
HTML-safe processing via DOM-based fixers is the package's core promise, but it is also the main technical risk and must be tested rather than assumed. Verify behavior against your real content shapes: CMS rich text, Markdown-rendered HTML, email templates, and generated PDFs. Pay particular attention to malformed or partial markup, attributes containing quotes or URLs, inline scripts, and embedded JSON-LD.
How do I configure the locale for typography rules in Laravel?
Locale support is built in and language-specific rules such as French typography are applied per locale. The safest pattern is to pass the locale explicitly at the call site and map your Laravel app locale to a JoliTypo locale inside a config file. Avoid auto-detection for mixed-language content, and decide in advance which locales are in scope for phase one.
Can I disable specific fixers or choose which ones run?
Yes, the fixers for quotes, dashes, ellipses, spaces, and similar rules are individually configurable. In Laravel, expose the enabled fixer list in config/typography.php rather than hard-coding it in the wrapper class. That lets you run a reduced set in risky contexts, such as email templates or PDFs where glyph coverage is uncertain.
Should I apply JoliTypo at render time or store the corrected text in the database?
Render-time is generally the safer default because writing corrected text changes your source of truth, breaks round-trip editing, shifts byte length through non-breaking spaces and entities, and can desynchronize full-text search. The trade-offs are CPU cost per request and the risk of the transformation leaking into API responses. Keep it in the presentation or serialization layer and never apply it to JSON payloads, webhook bodies, signatures, or idempotency keys.
Does JoliTypo modify content inside script, style, pre, or code blocks?
The package is HTML-aware and preserves existing markup, but you should confirm its behavior on script, style, pre, code, and comment nodes with your own fixtures before relying on it. Any HTML-aware string rewriter can mangle inline scripts, JSON-LD, or preformatted code if the parser behaves unexpectedly on partial markup. Configuring an excluded-tags list in your wrapper gives you an explicit safety net.
Is JoliTypo idempotent, and is it safe to run twice?
Do not assume idempotency; verify it by running the fixer twice over a representative corpus and comparing the output byte for byte. Repeated processing of already-corrected text should be a no-op, but non-breaking space and entity handling makes this worth proving. Add a regression test so future package upgrades cannot silently change the result.
What PHP extensions does JoliTypo need?
Typographic processing in PHP typically relies on mbstring, and locale-specific rules may use intl, so check the composer.json requirements for the exact release you install. Confirm those extensions are enabled in every environment you deploy to, including CI, queue workers, and container images. Also verify that your PDF fonts and email clients render curly quotes, em dashes, and narrow no-break spaces instead of tofu boxes.
Is JoliTypo actively maintained, and what are the alternatives?
JoliTypo is MIT licensed with a recent release and a modest star count, indicating active but niche adoption, and it is effectively a single-vendor dependency with no SLA. It remains a clean fit because it is a small, replaceable edge-of-pipeline transformer that you can isolate behind your own TypographyFormatter interface. If you swap it out later, that thin seam keeps the blast radius small; evaluate alternatives on HTML fidelity, locale coverage, and PHP version support.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console