Repository navigation
refactor: cast post content with core's SanitizedHtml #12
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
Changes from all commits
48bc1f2
d4b50f0
e18c53a
326b5aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| use Modules\Blog\Contracts\Redirectable; | ||
| use Modules\Blog\Enums\PostStatus; | ||
| use Modules\Blog\Traits\HasRedirects; | ||
| use Saucebase\Core\Casts\SanitizedHtml; | ||
| use Spatie\Feed\Feedable; | ||
| use Spatie\Feed\FeedItem; | ||
| use Spatie\MediaLibrary\HasMedia; | ||
|
|
@@ -73,6 +74,8 @@ protected function casts(): array | |
| return [ | ||
| 'status' => PostStatus::class, | ||
| 'published_at' => 'datetime', | ||
| // Rendered as markup on the post page; sanitised on every read. | ||
| 'content' => SanitizedHtml::class, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ]; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.