@dompurify/server
It's also very simple to use and get started with. DOMPurify was started in February 2014 and, meanwhile, has reached version v3.4.16.
Official Documentation ↗v3.0. Check the official docs for the latest API surface.Installation
npm install isomorphic-dompurifypnpm add isomorphic-dompurifyyarn add isomorphic-dompurifyMethods
No methods match this filter.
Overview
It’s also very simple to use and get started with. DOMPurify was started in February 2014 and, meanwhile, has reached version v3.4.16.
API reference status
This page lists only entry points that appear verbatim in the official README examples: sanitize, match. Parameter and return types are not given by the official README, so signatures are marked unverified.
Errors
The following points are quoted verbatim from the official documentation (https://github.com/cure53/DOMPurify). Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.
- Okay, makes sense, let’s move on After sanitizing your markup, you can also have a look at the property DOMPurify.removed and find out, what elements and attributes were thrown out. (https://github.com/cure53/DOMPurify)
- That is circular by definition - sanitizing would call the policy, which sanitizes by calling DOMPurify again - and DOMPurify will throw a descriptive TypeError to prevent the infinite recursion. (https://github.com/cure53/DOMPurify)
- If it is, DOMPurify strips the root’s subtree of every non-allow-listed attribute and then throws a TypeError, so a rejected root is never handed back armed. (https://github.com/cure53/DOMPurify)
Security notes
Quoted from the official documentation (https://github.com/cure53/DOMPurify); this is not a complete threat model.
- DOMPurify is written by security people who have vast background in web attacks and XSS. (https://github.com/cure53/DOMPurify)
- For more details please also read about our Security Goals & Threat Model. (https://github.com/cure53/DOMPurify)
- DOMPurify will strip out everything that contains dangerous HTML and thereby prevent XSS attacks and other nastiness. (https://github.com/cure53/DOMPurify)
Verification notes
- Official source: https://github.com/cure53/DOMPurify
- Evidence: https://cdn.jsdelivr.net/gh/cure53/DOMPurify@latest/README.md
- Checked on 2026-11-04 by
scripts/phase11/build-api-profiles.mjs
FAQ
- What does isomorphic-dompurify do?
- It's also very simple to use and get started with.
- How do I install isomorphic-dompurify?
- Run `npm install isomorphic-dompurify`.
- Where can I verify the API details?
- Official repository/documentation: https://github.com/cure53/DOMPurify. Checked on 2026-11-04; signatures and return values not stated in the official README are marked unverified.
Report a problem with this API docOpens a pre-filled issue on GitHub.