Skip to content

Commit

Permalink
Merge pull request #1006 from reduckted/type-declarations
Browse files Browse the repository at this point in the history
Add Type Declarations
  • Loading branch information
cure53 authored Oct 18, 2024
2 parents e4caa67 + f487c8e commit eb7b40d
Show file tree
Hide file tree
Showing 24 changed files with 3,646 additions and 1,351 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ Note that by default, we permit HTML, SVG **and** MathML. If you only need HTML,
const clean = DOMPurify.sanitize(dirty, { USE_PROFILES: { html: true } });
```

### Where are the TypeScript type definitions?

They can be found here: [@types/dompurify](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dompurify)

### Is there any foot-gun potential?

Well, please note, if you _first_ sanitize HTML and then modify it _afterwards_, you might easily **void the effects of sanitization**. If you feed the sanitized markup to another library _after_ sanitization, please be certain that the library doesn't mess around with the HTML on its own.
Expand Down
Loading

0 comments on commit eb7b40d

Please sign in to comment.