-
-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
console warn fallback for <b> when run with Happydom #903
Conversation
Hey there, thanks for sending over the PR. Indeed, we believe, this is an issue in Happydom itself, here is more context: #878 I am hesitant to accept the PR since working with outerHTML doesn't really fix this and also adds additional complications, such as for elements that don't have an outerHTML etc. I am not sure how active Happydom is, but I guess the best fix would be to address the root cause. |
I am wondering, do we even need the |
Ok thanks a lot to respond so quickly ! After re-thinking this, we're facing 3 issues here that's are not directly related to Dompurify
|
I hear you 😄 I want to get rid of the Would you mind reshaping the PR so we nuke the whole |
The linter doesn't love it yet, but likely easy to fix 😅 |
console.warn(element) is displaying a lot stuff, in some context like HappyDom this display a lot stuff because a recursive console output of the entire Dom.
Thanks 🙇 |
In case that works and keeps Happydom happy, we could consider a release soon. |
Hi everyone, sorry for missing the message. Thanks for the fix, I suppose as it was a fallback to fix the issue with nullable element for Angular Universal on the server side (for Angular 11-12 as I remember), we could definitely remove the console there. Probably it would be better then to leave a TODO/FIXME-comment to later review this fallback, probably we need to process more cases there. |
Summary
console.warn(element) is displaying a lot of stuff, in some context like HappyDom this displaying a lot of stuff because a recursive console output of the entire Dom.
Background & Context
I was thinking of the other solutions
Tasks
fallback value for <b>by SMS</b>
when callingDOMPurify.sanitize('The patient will receive a link <b>by SMS</b> to join the video consultation')
so why<b>by SMS</b>
will be an element considered as a fallback ?DOMPurify/src/purify.js
Lines 114 to 120 in 756cec3
Could be Happydom not implementing the same way the API for
<b>
?As now it seems Dompurify doesn't support Happydom so might be an upstream issue in Happydom itself.