Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Http\Requests\Manage\ManageArtworkUpdateRequest;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
it('rejects raw html in the legacy manage artwork update request', function (): void {
|
||||
$request = ManageArtworkUpdateRequest::create('/manage/123', 'POST', [
|
||||
'title' => 'Legacy Manage Artwork',
|
||||
'description' => '<img src="https://spam.example/test.jpg" alt="">',
|
||||
]);
|
||||
|
||||
$validator = Validator::make($request->all(), $request->rules());
|
||||
$request->withValidator($validator);
|
||||
|
||||
expect($validator->fails())->toBeTrue()
|
||||
->and($validator->errors()->has('description'))->toBeTrue();
|
||||
});
|
||||
Reference in New Issue
Block a user