@@ -314,6 +314,8 @@ attributes from the `W3C Standard Proposal`_ are allowed.
314
314
img : ' src'
315
315
# allow the <h1> element with all safe attributes
316
316
h1 : ' *'
317
+ # allow the <div> element with no attributes
318
+ div : []
317
319
318
320
.. code-block :: xml
319
321
@@ -343,9 +345,12 @@ attributes from the `W3C Standard Proposal`_ are allowed.
343
345
</framework : allow-element >
344
346
345
347
<!-- allow the <h1> element with all safe attributes -->
346
- <framework : allow-element name =" img " >
348
+ <framework : allow-element name =" h1 " >
347
349
<framework : attribute >*</framework : attribute >
348
350
</framework : allow-element >
351
+
352
+ <!-- allow the <div> element with no attributes -->
353
+ <framework : allow-element name =" div" />
349
354
</framework : sanitizer >
350
355
</framework : html-sanitizer >
351
356
</framework : config >
@@ -367,6 +372,9 @@ attributes from the `W3C Standard Proposal`_ are allowed.
367
372
368
373
// allow the <h1 > element with all safe attributes
369
374
->allowElement('h1', '*')
375
+
376
+ // allow the <div > element with no attributes
377
+ ->allowElement('div', [])
370
378
;
371
379
};
372
380
@@ -385,6 +393,9 @@ attributes from the `W3C Standard Proposal`_ are allowed.
385
393
386
394
// allow the <h1> element with all safe attributes
387
395
->allowElement('h1')
396
+
397
+ // allow the <div> element with no attributes
398
+ ->allowElement('div', [])
388
399
);
389
400
390
401
Block and Drop Elements
0 commit comments