cure53 / DOMPurify

DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
https://cure53.de/purify
Other
13.77k stars 708 forks source link

docs(README.md): correct hook name in example and remove misleading comment #942

Closed kyselberg closed 5 months ago

kyselberg commented 5 months ago

Summary

this pull request changes hook usage example

Background & Context

now hookEvent is passed only for uponSanitizeAttribute hook. currently there is misleading example of hook usage, where the beforeSanitizeElements hook is used.

in order to avoid misunderstandings and simplify life for next users of lib, let's correct this mistake.

cure53 commented 5 months ago

Oh, well spotted, thank you!