Skip to content

Conversation

George3d6
Copy link

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

  • Renamed all instances of dangerouslySetInnerHTML to bravelySetInnerHTML across the codebase.
  • Updated documentation and comments to reflect the new variable name.

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.

@facebook-github-bot
Copy link
Contributor

Hi @George3d6!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@react-sizebot
Copy link

Comparing: aec521a...fbbfada

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 175.90 kB 175.86 kB = 54.75 kB 54.75 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 177.97 kB 177.93 kB = 55.39 kB 55.39 kB
facebook-www/ReactDOM-prod.classic.js = 569.81 kB 569.77 kB = 100.29 kB 100.29 kB
facebook-www/ReactDOM-prod.modern.js = 553.67 kB 553.62 kB = 97.38 kB 97.37 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against fbbfada

@rickhanlonii
Copy link
Member

Thanks but we're going to keep the name the same.

@browniefed
Copy link

Thanks but we're going to keep the name the same.

brave

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.

5 participants