Skip to content

Files

Latest commit

 

History

History
19 lines (13 loc) · 460 Bytes

jsx-no-script-url.md

File metadata and controls

19 lines (13 loc) · 460 Bytes

Pattern: Use of javascript: URL scheme

Issue: -

Description

Using URLs with the javascript: scheme creates security vulnerabilities through potential injection of unsanitized content. React 16.9+ warns about these URLs, and future versions will throw errors when encountering them.

Examples

Example of incorrect code:

<a href="javascript:void(0)">Test</a>

Example of correct code:

<Foo test="javascript:void(0)" />