File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ attributes from the `W3C Standard Proposal`_ are allowed.
370
370
->allowElement('img', 'src')
371
371
372
372
// allow the <h1 > element with all safe attributes
373
- ->allowElement('h1')
373
+ ->allowElement('h1', '*' )
374
374
;
375
375
};
376
376
@@ -611,8 +611,7 @@ This option allows you to disallow attributes that were allowed before.
611
611
$framework->htmlSanitizer()
612
612
->sanitizer('app.post_sanitizer')
613
613
// allow the "data-attr" on all safe elements...
614
- ->allowAttribute('data-attr')
615
- ->element('*')
614
+ ->allowAttribute('data-attr', '*')
616
615
617
616
// ...except for the <section > element
618
617
->dropAttribute('data-attr', ['section'])
@@ -630,7 +629,7 @@ This option allows you to disallow attributes that were allowed before.
630
629
$postSanitizer = new HtmlSanitizer(
631
630
(new HtmlSanitizerConfig())
632
631
// allow the "data-attr" on all safe elements...
633
- ->allowAttribute('data-attr')
632
+ ->allowAttribute('data-attr', '*' )
634
633
635
634
// ...except for the <section> element
636
635
->dropAttribute('data-attr', ['section'])
You can’t perform that action at this time.
0 commit comments