Security: Remove use of innerHTML, disallow with linter #2706
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.
Remove
dangerouslySetInnerHTML
in the one place it was used as a shortcut for pasting in SVG without translating to React, and in the other place where it was used for HTML (work board), remove that altogether since it's not used anymore. Also remove use in tests where it was harmless, so we can add https://github.com/mozilla/eslint-plugin-no-unsanitized to the lint setup and fail the build on any use ofinnerHTML
. It's only used in one JS test with a bit of a different setup since it loads a fixture of server-rendered HTML.