r/javascript • • May 07 '26

The HTML Sanitizer API

https://alfy.blog/2026/05/07/html-sanitizer-api.html

I wrote an article about HTML Sanitizer API, a new native API that allows us to sanitize and parse HTML without relying on third party tools like DOMPurify

72 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/senfiaj May 26 '26

https://caniuse.com/mdn-api_element_sethtml,mdn-api_sanitizer
It's supported in most major browsers, Safari is the main one which doesn't support.