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

Remove javascript:void(0) from links that do not navigate #1938

Merged
merged 4 commits into from
Oct 26, 2020

Conversation

stevehobbsdev
Copy link
Contributor

Changes

This PR removes javascript:void(0) from those links that do not navigate
natively using the browser, but perform some other action using a JS callback
handler. In most cases, these links were already covered by a call to
preventDefault() on the event object anyway.

The motivation is to stop warnings from React about using javascript: URLs
for security reasons. Note that our usage of javascript:void(0) does not
cause a security issue as there's no chance of malicious content being injected
by a third party, but we have refactored out the links all the same.

References

#1917

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@stevehobbsdev stevehobbsdev requested a review from a team October 23, 2020 14:17
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.

3 participants