Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent javascript URLs warning in React 16.9 #2384

Closed
hannes-o-brunner opened this issue Oct 25, 2019 · 2 comments · Fixed by #2829 · May be fixed by bluecanvas/design-system-react#1
Closed

Prevent javascript URLs warning in React 16.9 #2384

hannes-o-brunner opened this issue Oct 25, 2019 · 2 comments · Fixed by #2829 · May be fixed by bluecanvas/design-system-react#1

Comments

@hannes-o-brunner
Copy link

@salesforce/[email protected]

React 16.9 emits the following warning:

Warning: A future version of React will block javascript: URLs as a security precaution. Use event 
handlers instead if you can. If you need to generate unsafe HTML try using 
dangerouslySetInnerHTML instead. React was passed "javascript:void(0);".

See facebook/react#16592 for the feature issue
And some related discussions here: facebook/react#16382

@stale
Copy link

stale bot commented Dec 24, 2019

This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you.

@stale stale bot added the stale label Dec 24, 2019
@stale stale bot closed this as completed Dec 31, 2019
@stale stale bot removed the stale label Jan 6, 2020
@xoob
Copy link
Contributor

xoob commented May 11, 2020

Just a heads-up, this is causing npm run test:unit to fail hard.

  SLDSAlert:
    Dismiss alert
      ✗ "before each" hook: mountComponentInside for "calls onRequestClose handler"
	Error: Warning: A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.%s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants