Conversation
Preserve jsdom's package-relative asset paths when loading the SSR bundle.
Contributor
|
908ec48 was deployed to: https://fred-pr1240.review.mdn.allizom.net/ |
Contributor
Author
|
Closing in favor of build-time validation of |
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.
Description
Migrate from
insanetoisomorphic-dompurify.Motivation
Avoid
insane, which is unmaintained and has an unpatched vulnerability.Additional details
Add 33 sanitizer regression cases covering HTML rendering, hook isolation,
element name/tag matching, translator-supplied attributes, and URL
validation, including relative links.
The SSR bundle externalizes
isomorphic-dompurify, because jsdom readspackage-relative assets that cannot be bundled. It resolves from
node_modulesat runtime, so the package stays independencies.The client
indexentrypoint grows from 59.8 KB to 68.9 KB gzipped(170.5 KB to 195.5 KB raw), since
dompurifyis larger thaninsane.Related issues and pull requests
Resolves GHSA-w455-mfq9-hf74.