WPT
wpt / sanitizer-api / sanitizer-config.html
Spec: HTML Sanitizer API ↗
Runs: Chrome 155.0.8039.0 (wpt@2b4dfe72c, 2026-09-03) | Firefox 157.0a1 (wpt@2b4dfe72c, 2026-09-03) | Safari 251 preview (wpt@5ce815a83, 2026-08-27) | Ladybird 1.0-56c61 (wpt@ed1909ed6, 2026-09-03) | Servo Servo 0.6 (wpt@09159dcb3, 2026-09-02) | Blitz 188486089 (wpt@a95401e4e, 2026-09-02)
View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 71/71 | 62/71 | 0/71 | 0/71 | 71/71 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| Sanitizer constructor without config. | PASS | PASS | FAIL | FAIL | PASS | — |
| Sanitizer constructor with empty config. | PASS | PASS | FAIL | FAIL | PASS | — |
| Sanitizer constructor with null as config. | PASS | PASS | FAIL | FAIL | PASS | — |
| Sanitizer constructor with undefined as config. | PASS | PASS | FAIL | FAIL | PASS | — |
| Sanitizer constructor with config ignore unknown values. | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig comments field. | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig dataAttributes field. | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: elements: ["div"] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: elements: [{"name":"b"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: elements: [{"name":"b","namespace":null}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: elements: [{"name":"b","namespace":""}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: elements: [{"name":"p","namespace":"http://www.w3.org/1999/xhtml"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: elements: [{"name":"bla","namespace":"http://fantasy.org/namespace"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeElements: ["div"] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeElements: [{"name":"b"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeElements: [{"name":"b","namespace":null}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeElements: [{"name":"b","namespace":""}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeElements: [{"name":"p","namespace":"http://www.w3.org/1999/xhtml"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeElements: [{"name":"bla","namespace":"http://fantasy.org/namespace"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: replaceWithChildrenElements: ["div"] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: replaceWithChildrenElements: [{"name":"b"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: replaceWithChildrenElements: [{"name":"b","namespace":null}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: replaceWithChildrenElements: [{"name":"b","namespace":""}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: replaceWithChildrenElements: [{"name":"p","namespace":"http://www.w3.org/1999/xhtml"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: replaceWithChildrenElements: [{"name":"bla","namespace":"http://fantasy.org/namespace"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: processingInstructions: ["target-1"] | PASS | FAIL | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: processingInstructions: [{"target":"target-1"}] | PASS | FAIL | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeProcessingInstructions: ["target-1"] | PASS | FAIL | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeProcessingInstructions: [{"target":"target-1"}] | PASS | FAIL | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: attributes: ["href"] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: attributes: [{"name":"href","namespace":null}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: attributes: [{"name":"href","namespace":""}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: attributes: [{"name":"href","namespace":"https://www.w3.org/1999/xlink"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeAttributes: ["href"] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeAttributes: [{"name":"href","namespace":null}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeAttributes: [{"name":"href","namespace":""}] | PASS | PASS | FAIL | FAIL | PASS | — |
| SanitizerConfig, normalization: removeAttributes: [{"name":"href","namespace":"https://www.w3.org/1999/xlink"}] | PASS | PASS | FAIL | FAIL | PASS | — |
| Test elements addition. | PASS | PASS | FAIL | FAIL | PASS | — |
| Test elements removal. | PASS | PASS | FAIL | FAIL | PASS | — |
| Test elements replacewithchildren. | PASS | PASS | FAIL | FAIL | PASS | — |
| Test processingInstructions addition. | PASS | FAIL | FAIL | FAIL | PASS | — |
| Test processingInstructions removal. | PASS | FAIL | FAIL | FAIL | PASS | — |
| Test attribute addition. | PASS | PASS | FAIL | FAIL | PASS | — |
| Test attribute removal. | PASS | PASS | FAIL | FAIL | PASS | — |
| Test attribute-per-element sets (i.e. overwrites). | PASS | PASS | FAIL | FAIL | PASS | — |
| Test removeAttribute-per-element sets (i.e. overwrites). | PASS | PASS | FAIL | FAIL | PASS | — |
| Both elements and removeElements should not be allowed. | PASS | PASS | FAIL | FAIL | PASS | — |
| Both attributes and removeAttributes should not be allowed. | PASS | PASS | FAIL | FAIL | PASS | — |
| Both processingInstructions and removeProcessingInstructions should not be allowed. | PASS | FAIL | FAIL | FAIL | PASS | — |
| config[elements] should not allow duplicates | PASS | PASS | FAIL | FAIL | PASS | — |
| config[removeElements] should not allow duplicates | PASS | PASS | FAIL | FAIL | PASS | — |
| config[replaceWithChildrenElements] should not allow duplicates | PASS | PASS | FAIL | FAIL | PASS | — |
| config[attributes] should not allow duplicates | PASS | PASS | FAIL | FAIL | PASS | — |
| config[removeAttributes] should not allow duplicates | PASS | PASS | FAIL | FAIL | PASS | — |
| config[processingInstructions] should not allow duplicate targets | PASS | FAIL | FAIL | FAIL | PASS | — |
| config[removeProcessingInstructions] should not allow duplicate targets | PASS | FAIL | FAIL | FAIL | PASS | — |
| config[replaceWithChildrenElements] should not allow non-replaceable elements | PASS | PASS | FAIL | FAIL | PASS | — |
| config[elements] and config[replaceWithChildrenElements] should not intersect | PASS | PASS | FAIL | FAIL | PASS | — |
| config[removeElements] and config[replaceWithChildrenElements] should not intersect | PASS | PASS | FAIL | FAIL | PASS | — |
| Duplicates in element[attributes] with config[attributes] should not be allowed. | PASS | PASS | FAIL | FAIL | PASS | — |
| Duplicates in element[removeAttributes] with config[attributes] should not be allowed. | PASS | PASS | FAIL | FAIL | PASS | — |
| config[attributes] and element[attributes] should not intersect. | PASS | PASS | FAIL | FAIL | PASS | — |
| element[removeAttributes] should be a subset of config[attributes] | PASS | PASS | FAIL | FAIL | PASS | — |
| element[attributes] with a data attribute must not co-exist with config[dataAttributes] set to true. | PASS | PASS | FAIL | FAIL | PASS | — |
| config[attributes] with a data attribute must not co-exist with config[dataAttributes] set to true. | PASS | PASS | FAIL | FAIL | PASS | — |
| element[attributes] and element[removeAttributes] should not both exist with config[removeAttributes]. | PASS | PASS | FAIL | FAIL | PASS | — |
| Duplicates in element[attributes] with config[removeAttributes] should not be allowed. | PASS | PASS | FAIL | FAIL | PASS | — |
| Duplicates in element[removeAttributes] with config[removeAttributes] should not be allowed. | PASS | PASS | FAIL | FAIL | PASS | — |
| config[removeAttributes] and element[attributes] should not intersect. | PASS | PASS | FAIL | FAIL | PASS | — |
| config[removeAttributes] and element[removeAttributes] should not intersect. | PASS | PASS | FAIL | FAIL | PASS | — |
| Can not use config[dataAttributes] and config[removeAttributes] together. | PASS | PASS | FAIL | FAIL | PASS | — |