Rename dangerouslySetInnerHTML to bravelySetInnerHTML #27704
Closed
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
This pull request addresses the renaming of the variable dangerouslySetInnerHTML to bravelySetInnerHTML. The change aims to maintain clarity about the variable's purpose while adopting a more positive naming convention.
Changes
The original name, dangerouslySetInnerHTML, was intended to warn developers of the potential risks associated with directly manipulating HTML content. However, this naming can also impart a sense of fear or hesitation, which might not be conducive to a confident coding environment. The new name, bravelySetInnerHTML, continues to imply caution while also providing a feeling of heroism. As time passes without (detected) malicious script injections, it will invoke a sense of achievement when looking back on the codebase.
How did you test this change?
In the spirit of this PR I have not only avoided testing or running the changes, but the changes themselves were made using a command line script outputted by llama which I avoided verifying or even reading.