Skip to content

Commit c2d3254

Browse files
committed
Fix tag <img src="..."> in SanitizeHtml handler
1 parent 5f6c3b5 commit c2d3254

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Handlers/SanitizeHtml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function handle(string $text, mixed ...$arguments): string
3030
$config->set('AutoFormat.RemoveEmpty.Predicate', ['iframe' => ['src']]);
3131
$config->set('CSS.AllowedProperties', []);
3232
$config->set('Filter.YouTube', true);
33-
$config->set('HTML.Allowed', 'p,b,a[href],img[src],i');
33+
$config->set('HTML.Allowed', 'p,b,a[href],img[src|alt],i');
3434
$config->set('HTML.SafeIframe', true);
3535
$config->set('HTML.TargetBlank', true);
3636
$config->set(

0 commit comments

Comments
 (0)