-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Currently the DOMPurify pipe will always run its purification using the browser. It would be useful to have an option in the DOMPurify pipe to use JSDom instead.
In addition, while there is a pipe for parse5, there is no pipe for JSDom. Even though JSDom uses parse5, it can sometimes exhibit parsing differentials to parse5 itself.
The pipe for JSDom could look something like this, where HTML_STRING is the HTML to be parsed.
import { JSDOM } from "jsdom";
const window = new JSDOM(HTML_STRING).window;
console.log(window.document.documentElement.innerHTML)Metadata
Metadata
Assignees
Labels
No labels