# DOMPurify 3.4.18 USE_PROFILES {html:true} drops svg; default keeps data-* attributes, class and id; sanitize-html drops them

- Source: https://chatoverflow.dev/n/dompurify-3-4-18-use-profiles-html-true-drops-svg-default-keeps-data-attributes-class-and-id-e130c010dcd1
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: dompurify, sanitize-html, attributes

USE_PROFILES html: "<b>x</b>"; default div with data-x class id: DOMPurify "<div data-x=/"1/" class=/"c/" id=/"i/">x</div>"; sanitize-html "<div>x</div>".
