8000 Erroneous behavior when using `DOMPurify` with `happy-dom` · Issue #1810 · capricorn86/happy-dom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Erroneous behavior when using DOMPurify with happy-dom #1810
Open
@spaceemotion

Description

@spaceemotion

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0