-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Currently, only 1 hook per entry point is allowed in configuration. However, DOMPurify actually supports multiple hooks per hook type: https://github.com/cure53/DOMPurify/blob/main/src/purify.ts#L105-L117. The docs for removeHook also reference a stack of hooks, and the code also executes all hooks for a type during sanitisation.
As such, to align with the DOMPurify API, it might be worthwhile to support such a capability.
That said, I will admit there is a very small amount of things that can be done with multiple functions that cannot be done with one (and I will freely admit that I cannot think of one as of the writing of this issue), so the benefit is likely to be limited.
Metadata
Metadata
Assignees
Labels
No labels