Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Console\Commands;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use App\Services\News\NewsService;
|
||||
use cPad\Plugins\News\Models\NewsArticle;
|
||||
|
||||
final class PublishScheduledNewsCommand extends Command
|
||||
@@ -17,6 +18,11 @@ final class PublishScheduledNewsCommand extends Command
|
||||
|
||||
protected $description = 'Publish scheduled News articles whose publish time has passed.';
|
||||
|
||||
public function __construct(private readonly NewsService $news)
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
$dryRun = (bool) $this->option('dry-run');
|
||||
@@ -60,11 +66,7 @@ final class PublishScheduledNewsCommand extends Command
|
||||
return;
|
||||
}
|
||||
|
||||
$article->forceFill([
|
||||
'editorial_status' => NewsArticle::EDITORIAL_STATUS_PUBLISHED,
|
||||
'status' => 'published',
|
||||
'published_at' => $article->published_at ?? $now,
|
||||
])->save();
|
||||
$this->news->publish($article);
|
||||
|
||||
$published++;
|
||||
$this->line(sprintf('Published News article #%d: "%s"', $article->id, $article->title));
|
||||
|
||||
Reference in New Issue
Block a user