Skip to content
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

Minor performance improvements #680

Merged
merged 3 commits into from May 11, 2022

Conversation

tiny-ben-tran
Copy link
Contributor

@tiny-ben-tran tiny-ben-tran commented May 11, 2022

Summary

  • Replace stringMatch with regExpTest since the latter is faster (https://stackoverflow.com/a/10940138/11275515)
  • Move commonSvgAndHTMLElements out so _checkValidNamespace() function doesn't re-create it in every single call
  • mXSS detection to bypass empty node

Background & Context

The engineers at Tiny made some improvements to the DOMpurify and would like to make a contribution upstream so we don't have to maintain these.

@cure53 cure53 merged commit 3d9dd14 into cure53:main May 11, 2022
@cure53
Copy link
Owner

cure53 commented May 11, 2022

This looks good, thank you! 😄

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.

None yet

2 participants