Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added custom casts - CleanHtml, CleanHtmlInput, CleanHtmlOutput #154

Merged
merged 1 commit into from
Oct 14, 2021
Merged

added custom casts - CleanHtml, CleanHtmlInput, CleanHtmlOutput #154

merged 1 commit into from
Oct 14, 2021

Conversation

tabacitu
Copy link
Contributor

@tabacitu tabacitu commented Oct 9, 2021

Fixes #152

Adds three custom casts:

use Mews\Purifier\Casts\CleanHtml;
use Mews\Purifier\Casts\CleanHtmlInput;
use Mews\Purifier\Casts\CleanHtmlOutput;

This way, the dev can more easily use HTMLPurifier directly inside their Eloquent models, without writing an accessor or mutator.

I'll follow up with a different PR for documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Idea] Custom cast for Purified HTML, to be easily used inside Eloquent Model casts
2 participants