Skip to content

Conversation

@NateScarlet
Copy link
Contributor

for sanitize svg/mathML child innerHTML

resolve #533

This pull request implements namespace config to allow user provide parent namespace

Background & Context

mXSS protection added in #495 removed the ability to sanitize svg/mathML fragment.

Need a option to re-enable them.

Tasks

lint error before i made the change:

src\purify.js:799:29
  ‼  799:29  Function has a complexity of 23. Maximum allowed is 20.  complexity

for sanitize svg/mathML child innerHTML

resolve cure53#533
@cure53
Copy link
Owner

cure53 commented Apr 27, 2021

This looks very sexy, let me review this today, thank you :)

@cure53 cure53 merged commit a42cf3e into cure53:main Apr 27, 2021
@NateScarlet
Copy link
Contributor Author

return WHOLE_DOCUMENT ? doc.documentElement : body;

this change cause error in firefox

@cure53
Copy link
Owner

cure53 commented Apr 27, 2021

Yeah, I am fine with this side effect for now.

@cure53
Copy link
Owner

cure53 commented Apr 27, 2021

Oof, the tests are green and now even MSIE is happy. Somewhat :D

@cure53
Copy link
Owner

cure53 commented Apr 27, 2021

Thank you for this PR! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

svg elements that not contained in <svg> been removed after 2.2.6

2 participants