Fix: Unsafe HTML Rendering with dangerouslySetInnerHTML #7976#7978
Closed
rahul-kr-rai wants to merge 4 commits into
Closed
Fix: Unsafe HTML Rendering with dangerouslySetInnerHTML #7976#7978rahul-kr-rai wants to merge 4 commits into
rahul-kr-rai wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
|
tests are broken, please take a look |
…s and Added null safety check for SVG rendering in SplashViz.jsx
Contributor
Author
|
cypress test are failing, I will fix it as soon as possible. |
Contributor
Author
alexander-akait
requested changes
Mar 11, 2026
Member
alexander-akait
left a comment
There was a problem hiding this comment.
Why we need it? We pass into dangerouslySetInnerHTML only safe content, it will decrease performance and nothing more
Contributor
Author
|
Then what to do? Close the PR and issue or do any changes. Please suggest which is best. |
Member
|
I think we don't need it at all, we only lost performance here |
Contributor
Author
|
As per your suggestion I am closing this PR as well as issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Issue Closes: #7976
This PR addresses a critical security vulnerability by fixing unsafe usage of
dangerouslySetInnerHTMLin three components. The changes eliminate potentialXSS risksby either sanitizing HTML content or replacing dangerous patterns with safe React's declarative approach withuseEffectWhat kind of change does this PR introduce?
Security Fix: Removes potential
XSS vulnerabilitiesby sanitizing HTML content and eliminating unsafe HTML injection patterns.Code Refactor: Converts class-based components to functional components where appropriate, improving maintainability.
Dependency Addition: Adds
dompurifyas a new dependency for HTML sanitization.Did you add tests for your changes?
Verify it,
Does this PR introduce a breaking change?
No
If relevant, what needs to be documented once your changes are merged or what have you already documented?
Use of AI
Yes, to increase productivity by following the AI policy.