You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We probably need to load something like jsdom on the backend (but not the frontend) for dompurify to work.
Inspiration from hub code:
letpurify: createDOMPurify.DOMPurifyI;asyncfunctionloadDOMPurify(){if(purify){return;}if(typeofwindow==="undefined"){/// To avoid needing the dependency on the frontend, we load it dynamically on the backend// eslint-disable-next-line @typescript-eslint/no-shadowconst{JSDOM}=awaitimport("jsdom");purify=createDOMPurify(newJSDOM().windowasunknownasWindow);}else{purify=createDOMPurify(window);}
The text was updated successfully, but these errors were encountered:
Either before or after the call to
marked
.We probably need to load something like
jsdom
on the backend (but not the frontend) for dompurify to work.Inspiration from hub code:
The text was updated successfully, but these errors were encountered: