Skip to content

Commit 2e7b619

Browse files
committed
Add missing config formats
1 parent 073bf78 commit 2e7b619

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

html_sanitizer.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,12 @@ attributes from the `W3C Standard Proposal`_ are allowed.
349349
</framework:allow-element>
350350
351351
<!-- allow the <h1> element with all safe attributes -->
352-
<framework:allow-element name="img">
352+
<framework:allow-element name="h1">
353353
<framework:attribute>*</framework:attribute>
354354
</framework:allow-element>
355+
356+
<!-- allow the <div> element with no attributes -->
357+
<framework:allow-element name="div"/>
355358
</framework:sanitizer>
356359
</framework:html-sanitizer>
357360
</framework:config>
@@ -373,6 +376,9 @@ attributes from the `W3C Standard Proposal`_ are allowed.
373376
374377
// allow the <h1> element with all safe attributes
375378
->allowElement('h1', '*')
379+
380+
// allow the <div> element with no attributes
381+
->allowElement('div', [])
376382
;
377383
};
378384
@@ -391,6 +397,9 @@ attributes from the `W3C Standard Proposal`_ are allowed.
391397
392398
// allow the <h1> element with all safe attributes
393399
->allowElement('h1')
400+
401+
// allow the <div> element with no attributes
402+
->allowElement('div', [])
394403
);
395404
396405
Block and Drop Elements

0 commit comments

Comments
 (0)