Open
Description
I am opening this bug here after the author of DOMPurify said it's likely an issue with happy-dom
:
Describe the bug
When using DOMPurify
, the purification seems to only consider the parent elements, not children. Furthermore, Incomplete elements (ones without a closing tag) aren't handled properly.
This behavior does not happen when using jsdom
or when running inside a browser.
To Reproduce
(See original DOMPurify issue)
Expected behavior
The elements get properly sanitized, similar to when using jsdom
or a regular browser.
Additional context
I noticed an issue while trying to switch from jsdom to happy-dom. The behavior with using DOMPurify is not consistent and seems incomplete.
See more over at cure53/DOMPurify#1094